/* Main layout for the product page */
.product-page-main {
    max-width: 1200px;
    margin: 3rem auto;
    padding: 0 2rem;
}

.product-main-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: start;
}

/* --- Image Gallery --- */
.product-gallery {
    position: sticky; /* Keeps gallery in view on scroll */
    top: 120px;
}

.main-image-container {
    border: 1px solid #eee;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 1rem;
}

#main-product-image {
    width: 100%;
    height: auto;
    display: block;
    aspect-ratio: 1 / 1;
    object-fit: cover;
}

.thumbnail-images {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 0.75rem;
}

.thumbnail-image {
    width: 100%;
    border-radius: 5px;
    border: 2px solid transparent;
    cursor: pointer;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    transition: border-color 0.3s;
}

.thumbnail-image:hover {
    border-color: #ddd;
}

.thumbnail-image.active {
    border-color: var(--accent-color);
}

/* --- Product Details --- */
.product-title {
    font-family: var(--secondary-font);
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.product-price-large {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--accent-color);
    margin-bottom: 1.5rem;
}

.product-short-description {
    line-height: 1.8;
    margin-bottom: 2rem;
    color: #555;
}

/* ======================================================= */
/* === THIS IS THE CORRECTED SECTION YOU REQUESTED === */
/* ======================================================= */
.product-actions-vertical {
    display: flex;
    flex-direction: column; /* This stacks the items vertically */
    gap: 1rem; /* This creates space between the items */
    margin-bottom: 2rem;
    max-width: 350px; /* Optional: Constrain the width for a cleaner look */
}

/* No change to the selector itself */
.quantity-selector {
    display: flex;
    border: 1px solid #ccc;
    border-radius: 10px;
    overflow: hidden; /* Helps contain the button/input styles */
}

.quantity-selector input {
    width: 60px;
    text-align: center;
    border: none;
    font-size: 1.1rem;
    font-weight: 700;
    -moz-appearance: textfield; /* Firefox */

}
.quantity-selector input::-webkit-outer-spin-button,
.quantity-selector input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;

}


.quantity-btn {
    border: none;
     flex: 0 0 40px;
    font-size: 1.5rem;
    padding: 0 1rem;
    cursor: pointer;
    flex: 1;
    background-color: var(--accent-color);
}
/* Color selecting */
.color-select {
    width: 100%;
    background-color: white;
    color: var(--primary-color);
    height: 3rem;
    margin-bottom: 12px;
    border: 1px solid var(--accent-color);
    border-radius: 10px;
    font-size: 18px;
}

/* The button will now naturally take up the full width of its container */
.add-to-cart-btn {
    background-color: var(--primary-color);
    color: #fff;
    border: none;
    border-radius: 5px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: background-color 0.3s;
    padding: 0.75rem 1.5rem;
    width: 100%; /* Ensure it fills the vertical container's width */
}
/* ======================================================= */
/* ======================================================= */

.add-to-cart-btn:hover {
    background-color: #000;
}

.product-meta a {
    color: var(--accent-color);
    text-decoration: none;
}

/* --- Information Tabs --- */
.product-info-tabs {
    margin-top: 5rem;
    border-top: 1px solid #eee;
    padding-top: 2rem;
}

.tab-links {
    display: flex;
    gap: 1.5rem;
    border-bottom: 1px solid #eee;
    margin-bottom: 1.5rem;
}

.tab-link {
    background: none;
    border: none;
    font-size: 1.1rem;
    padding: 0 0 1rem 0;
    cursor: pointer;
    font-family: var(--primary-font);
    font-weight: 700;
    color: #888;
    position: relative;
    border-bottom: 3px solid transparent;
}

.tab-link.active {
    color: var(--primary-color);
    border-bottom-color: var(--accent-color);
}

.tab-content {
    display: none;
    line-height: 2;
}

.tab-content.active {
    display: block;
}


/* --- Responsive Styles --- */
@media (max-width: 768px) {
    .product-main-grid {
        grid-template-columns: 1fr; /* Stack columns on mobile */
    }

    .product-gallery {
        position: static; /* Remove sticky position on mobile */
    }

    .product-title {
        font-size: 2rem;
    }

    /* Make sure the actions area doesn't get too wide on mobile */
    .product-actions-vertical {
        max-width: 100%;
    }
}