/* css/product.css */

/* --- Layout Container --- */
.product-detail-wrapper {
    display: flex;       /* This forces side-by-side */
    flex-wrap: wrap;     /* Allows wrapping on mobile */
    gap: 40px;           /* Space between image and text */
    align-items: flex-start;
    margin-bottom: 60px;
}

/* --- Left Column (Image) --- */
.detail-image-container {
    flex: 1;             /* Takes up equal space */
    min-width: 300px;    /* Prevents it from getting too small */
    background: #fff;
    border: 1px solid #e1e1e1;
    border-radius: 12px;
    padding: 20px;
    position: relative;  /* For badges */
    display: flex;
    justify-content: center;
    align-items: center;
}


.detail-img {
    width: 100%;
    height: auto;
    max-height: 500px;
    object-fit: contain;
}

/* --- Right Column (Info) --- */
.detail-info {
    flex: 1;             /* Takes up equal space */
    min-width: 300px;
    display: flex;
    flex-direction: column;
}

.detail-title {
    font-size: 2.2rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 10px;
    line-height: 1.2;
}

.detail-meta {
    font-size: 1rem;
    color: #7f8c8d;
    margin-bottom: 15px;
}

/* Price Box */
.detail-price-box {
    background-color: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    display: inline-block;
}

.old-price {
    text-decoration: line-through;
    color: #999;
    font-size: 1.1rem;
    margin-right: 10px;
}

.current-price {
    font-size: 1.8rem;
    font-weight: bold;
    color: #2c3e50;
}

.sale-text { color: #e74c3c; }

/* Description */
.detail-description {
    font-size: 1.05rem;
    color: #555;
    line-height: 1.8;
    margin-bottom: 30px;
    border-top: 1px solid #eee;
    padding-top: 20px;
}

/* --- Quantity & Action Area --- */
.action-area {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-top: auto; /* Push to bottom if needed */
}

/* The Modern Quantity Selector Wrapper */
.qty-selector {
    display: flex;
    align-items: center;
    border: 2px solid #ddd;
    border-radius: 6px;
    overflow: hidden;
    width: 140px; /* Fixed width */
    height: 50px;
}

/* The Buttons (- and +) */
.qty-btn {
    width: 40px;
    height: 100%;
    background-color: #f1f2f6;
    border: none;
    font-size: 1.2rem;
    font-weight: bold;
    color: #333;
    cursor: pointer;
    transition: background 0.2s;
}

.qty-btn:hover {
    background-color: #e1e1e1;
}

.qty-btn:active {
    background-color: #ccc;
}

/* The Input Field (Number) */
.qty-input {
    width: 60px; /* Remaining space */
    height: 100%;
    border: none; /* Borders handled by wrapper */
    text-align: center;
    font-size: 1.2rem;
    font-weight: bold;
    -moz-appearance: textfield; /* Hides default arrows Firefox */
}
/* Hides default arrows Chrome/Safari */
.qty-input::-webkit-outer-spin-button,
.qty-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Add to Cart Button */
.btn-add-large {
    flex-grow: 1; /* Takes remaining width */
    height: 50px;
    font-size: 1.1rem;
    font-weight: bold;
    background-color: #3498db;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.3s;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn-add-large:hover {
    background-color: #2980b9;
}

.btn-add-large:disabled {
    background-color: #bdc3c7;
    cursor: not-allowed;
}

/* Responsive: Stack on Mobile */
@media (max-width: 768px) {
    .action-area {
        flex-direction: column; /* Stack Qty and Button */
        align-items: stretch;
    }
    .qty-selector {
        width: 100%; /* Full width quantity */
    }
    .qty-input {
        flex-grow: 1;
    }
}