/* =========================
   SINGLE PRODUCT PAGE
   ========================= */

/* Product Gallery */
/* Main gallery container */
.woocommerce-product-gallery {
    position: relative;
    margin-bottom: 30px;
}

/* Main image wrapper */
.woocommerce-product-gallery__wrapper {
    display: flex;
    justify-content: center;
    flex-direction: column;
    align-items: center;
}

/* Main product image */
.woocommerce-product-gallery__image img {
    width: 100% !important;
    height: auto !important;
    max-height: 500px; /* Control max height */
    object-fit: contain; /* Prevent cropping */
    display: block;
    margin: 0 auto;
}

.woocommerce-product-gallery__image img:hover {
    transform: scale(1.05);
}

.woocommerce-product-gallery {
    display: block !important;
    max-width: 600px; /* Or 50% if two columns */
    margin: 0 auto;
}

.woocommerce-product-gallery__wrapper {
    display: block;
}

.flex-viewport {
    height: auto !important;
}

.flex-control-thumbs img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover;
}


/* Thumbnails row */
.flex-control-nav.flex-control-thumbs {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 15px;
    padding: 0;
}

/* Thumbnail list items */
.flex-control-nav.flex-control-thumbs li {
    width: 70px !important;
    height: 70px !important;
    overflow: hidden;
    border-radius: 6px;
    border: 1px solid #eee;
    transition: border 0.3s ease;
    list-style: none;
}

/* Thumbnail images */
.flex-control-nav.flex-control-thumbs li img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    cursor: pointer;
}

/* Hover effect for thumbnails */
.flex-control-nav.flex-control-thumbs li:hover {
    border: 1px solid #c19a6b; /* Highlight on hover */
}

/* Lightbox close button */
.pswp__button--close {
    background: #000 !important;
    color: #fff;
    border-radius: 50%;
    width: 35px;
    height: 35px;
}

/* Zoom Icon Styling */
.woocommerce-product-gallery__trigger {
    position: absolute;
    top: 15px;
    right: 15px;
    background: #000;
    color: #fff;
    border-radius: 50%;
    width: 35px;
    height: 35px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 14px;
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

.woocommerce-product-gallery__trigger:hover {
    opacity: 1;
}

/* Sticky Add to Cart on Mobile */
@media (max-width: 768px) {
    .product-detail-cart {
        position: fixed;
        bottom: 0;
        left: 0;
        width: 100%;
        background: #fff;
        padding: 15px;
        box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
        display: flex;
        justify-content: center;
        z-index: 1000;
    }

    .product-detail-cart .single_add_to_cart_button {
        width: 100%;
        font-size: 1rem;
        padding: 14px;
    }
}

/* Summary Box */
.single-product .product .summary {
    display: flex;
    flex-direction: column;
    gap: 20px;
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

/* Product Title */
.single-product .product_title {
    font-size: 2rem;
    font-weight: 700;
    color: #222;
    margin-bottom: 10px;
}

/* Price */
.single-product .price {
    font-size: 1.8rem;
    color: #c19a6b;
    font-weight: bold;
    margin-bottom: 15px;
}

/* Short Description */
.single-product .woocommerce-product-details__short-description {
    font-size: 1rem;
    color: #555;
    line-height: 1.6;
}

/* Quantity + Add to Cart */
.single-product form.cart {
    display: flex;
    align-items: center;
    gap: 15px;
}

.single-product form.cart .quantity {
    display: flex;
    align-items: center;
    border: 1px solid #ddd;
    border-radius: 4px;
    overflow: hidden;
}

.single-product form.cart .quantity input {
    width: 50px;
    text-align: center;
    border: none;
    font-size: 1rem;
    padding: 10px;
}

.single-product form.cart .single_add_to_cart_button {
    background: #222;
    color: #fff;
    padding: 12px 25px;
    border-radius: 4px;
    font-size: 1rem;
    font-weight: bold;
    text-transform: uppercase;
    transition: background 0.3s ease, transform 0.3s ease;
}

.single-product form.cart .single_add_to_cart_button:hover {
    background: #444;
    transform: translateY(-2px);
}

/* =========================
   RELATED PRODUCTS (Modern Card)
   ========================= */
.related.products {
    margin-top: 60px;
    padding: 30px 0;
    border-top: 1px solid #eee;
}

.related.products h2 {
    font-size: 1.8rem;
    font-weight: 700;
    color: #222;
    text-align: center;
    margin-bottom: 30px;
    position: relative;
}

.related.products h2::after {
    content: "";
    display: block;
    width: 50px;
    height: 3px;
    background: #c19a6b;
    margin: 10px auto 0;
    border-radius: 2px;
}
/* Remove WooCommerce default float-based layout */
/* Remove old float layout from WooCommerce */
ul.products li.product {
    float: none !important;
    width: auto !important;
    margin: 0 !important;
}


/* ===========================
   SHOP PAGE PRODUCT GRID
   =========================== */

/* =========================
   SHOP PAGE PRODUCT GRID (Updated with Equal Heights)
   ========================= */

/* Remove WooCommerce pseudo-elements */
ul.products.columns-3::before,
ul.products.columns-3::after {
    content: none !important;
    display: none !important;
}

/* Grid Layout for Product Archive */
ul.products {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    list-style: none;
    padding: 0;
    margin: 0 auto;
    max-width: 1200px; /* Centered layout */
    justify-content: center;
}

/* Product Card Styling */
ul.products li.product {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 10px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    transition: all 0.3s ease;
    padding: 15px;
    height: 100%;
    box-sizing: border-box;
}

/* Make all product cards equal height */
ul.products li.product {
    display: flex;
    flex-direction: column;
}

ul.products li.product .woocommerce-loop-product__link {
    flex-grow: 1; /* Fill remaining space */
    display: flex;
    flex-direction: column;
}

/* Hover effect */
ul.products li.product:hover {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transform: translateY(-3px);
}

/* Image fix for equal size */
ul.products li.product img {
    width: 100%;
    height: auto;
    object-fit: cover;
    margin-bottom: 10px;
    transition: transform 0.4s ease;
}

ul.products li.product:hover img {
    transform: scale(1.05);
}

/* Align Title and Price in One Line */
ul.products li.product .woocommerce-loop-product__title,
ul.products li.product .price {
    display: inline-block;
    vertical-align: middle;
    margin: 0;
}

ul.products li.product .woocommerce-loop-product__title {
    font-size: 1rem;
    font-weight: 600;
    color: #333;
    width: 70%;
    text-align: left;
}

ul.products li.product .price {
    font-size: 1rem;
    font-weight: bold;
    color: #c19a6b;
    width: 30%;
    text-align: right;
    white-space: nowrap;
}

/* Add to cart button at bottom */
ul.products li.product .button {
    background: #222;
    color: #fff;
    padding: 10px 18px;
    border-radius: 4px;
    font-weight: bold;
    transition: all 0.3s ease;
    display: block;
    text-align: center;
    margin-top: auto; /* Push button to bottom */
}

ul.products li.product .button:hover {
    background: #444;
    transform: translateY(-2px);
}

/* Responsive adjustments */
@media (max-width: 992px) {
    ul.products {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }
}

@media (max-width: 600px) {
    ul.products {
        grid-template-columns: 1fr;
    }
}

/* Remove ::before and ::after pseudo-elements from WooCommerce products list */
ul.products.columns-3::before,
ul.products.columns-3::after {
    content: none !important;
    display: none !important;
}

/* =======================
   Global WooCommerce Styles
   ======================= */

/* Remove extra spaces caused by ::before and ::after */
ul.products::before,
ul.products::after {
    content: none !important;
    display: none !important;
}

/* Category Header */
.shop-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 10px 15px;
    background: #f8f8f8;
    border-radius: 6px;
}

.shop-title {
    font-size: 1.8rem;
    font-weight: 600;
    color: #333;
    margin: 0;
}

.shop-controls {
    display: flex;
    gap: 15px;
    align-items: center;
}

.result-count {
    font-size: 14px;
    color: #555;
}

.ordering select {
    padding: 6px 10px;
    font-size: 14px;
    border: 1px solid #ccc;
    border-radius: 4px;
}

/* Product Grid */
ul.products {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    list-style: none;
    padding: 0;
    margin: 0;
}

/* Product Card */
ul.products li.product {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 10px;
    overflow: hidden;
    text-align: center;
    transition: all 0.3s ease-in-out;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

ul.products li.product:hover {
    box-shadow: 0 4px 14px rgba(0,0,0,0.08);
}

/* Product Image */
ul.products li.product img {
    width: 100%;
    height: auto;
    border-bottom: 1px solid #eee;
}

/* Product Title */
ul.products li.product .woocommerce-loop-product__title {
    font-size: 16px;
    font-weight: 500;
    margin: 12px 0;
    color: #333;
    padding: 0 10px;
    height: 45px;
    overflow: hidden;
}

/* Price */
ul.products li.product .price {
    font-size: 16px;
    color: #222;
    margin: 8px 0;
}

/* Add to Cart Button */
ul.products li.product .button {
    margin: 10px;
    padding: 10px;
    background: #0071a1;
    color: #fff;
    border-radius: 6px;
    font-weight: 500;
    text-transform: uppercase;
    font-size: 14px;
    transition: 0.3s;
}

ul.products li.product .button:hover {
    background: #005f87;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .shop-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .shop-controls {
        width: 100%;
        justify-content: space-between;
    }
}

/* Filters Section Styling */
.woocommerce .widget-area {
    background: #fff;
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.woocommerce .widget-area .widget {
    margin-bottom: 20px;
}

.woocommerce .widget-area .widget-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 10px;
    color: #333;
}

.woocommerce .widget-area ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.woocommerce .widget-area ul li {
    margin-bottom: 8px;
}

.woocommerce .widget-area ul li a {
    text-decoration: none;
    color: #555;
    font-size: 14px;
}

.woocommerce .widget-area ul li a:hover {
    color: #000;
}

/* Pagination Styling */
.woocommerce nav.woocommerce-pagination {
    text-align: center;
    margin: 20px 0;
}

.woocommerce nav.woocommerce-pagination ul {
    display: inline-flex;
    padding: 0;
    margin: 0;
    list-style: none;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #ddd;
}

.woocommerce nav.woocommerce-pagination ul li {
    margin: 0;
}

.woocommerce nav.woocommerce-pagination ul li a,
.woocommerce nav.woocommerce-pagination ul li span {
    display: block;
    padding: 10px 15px;
    color: #333;
    text-decoration: none;
    font-size: 14px;
    border-right: 1px solid #ddd;
    background: #fff;
}

.woocommerce nav.woocommerce-pagination ul li:last-child a,
.woocommerce nav.woocommerce-pagination ul li:last-child span {
    border-right: none;
}

.woocommerce nav.woocommerce-pagination ul li a:hover {
    background: #f5f5f5;
}

.woocommerce nav.woocommerce-pagination ul li span.current {
    background: #0071a1;
    color: #fff;
    font-weight: bold;
}

/* Responsive Design */
@media screen and (max-width: 768px) {
    .woocommerce .products {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .woocommerce .widget-area {
        margin-bottom: 20px;
        padding: 10px;
    }
}

@media screen and (max-width: 480px) {
    .woocommerce .products {
        grid-template-columns: 1fr;
    }
}

/* Shop Page Header Styling */
.woocommerce-products-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background-color: #fff;
    border-bottom: 1px solid #eaeaea;
    margin-bottom: 20px;
    position: sticky;
    top: 70px; /* adjust based on header height */
    z-index: 999;
}

/* Category Title */
.woocommerce-products-header h1,
.woocommerce-products-header h2 {
    font-size: 22px;
    font-weight: 600;
    color: #222;
    margin: 0;
}

/* Result Count */
.woocommerce-result-count {
    font-size: 14px;
    color: #666;
    margin: 0;
}

/* Sorting Dropdown Container */
.woocommerce-ordering {
    margin-left: auto;
}

/* Sorting Dropdown */
.woocommerce-ordering select {
    padding: 8px 12px;
    font-size: 14px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: #fff;
    color: #333;
    transition: all 0.3s ease;
    cursor: pointer;
}

.woocommerce-ordering select:hover {
    border-color: #888;
}

/* Hover Actions - Modern Redesign */
.hover-actions {
    position: absolute;
    top: 10px;
    right: 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.3s ease;
}

.product-card:hover .hover-actions {
    opacity: 1;
    transform: translateY(0);
}

.hover-actions a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: #fff;
    color: #333;
    border-radius: 50%;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    font-size: 18px;
    text-decoration: none;
    transition: background 0.3s ease, color 0.3s ease;
    overflow: hidden;
    position: relative;
}

.hover-actions a:hover {
    background: #000;
    color: #fff;
}

.hover-actions a .text {
    display: none; /* Hide text inside button */
}

/* Tooltip Effect */
.hover-actions a::after {
    content: attr(title);
    position: absolute;
    bottom: -30px;
    left: 50%;
    transform: translateX(-50%);
    background: #000;
    color: #fff;
    font-size: 12px;
    padding: 4px 8px;
    border-radius: 4px;
    opacity: 0;
    white-space: nowrap;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.hover-actions a:hover::after {
    opacity: 1;
}

/* Product Details Section */
.product-details {
    padding: 12px;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Title */
.product-title {
    font-size: 16px;
    font-weight: 600;
    color: #222;
    margin: 0;
    line-height: 1.4;
}

.product-title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.3s ease;
}

.product-title a:hover {
    color: #c19a6b; /* Modern gold tone hover */
}

/* Rating & Price Row */
.rating-price {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
    margin-top: 5px;
}

/* Rating */
.rating .star-rating {
    color: #ff9800; /* Orange stars like Amazon */
    font-size: 14px;
}

/* Price */
.price {
    font-weight: 700;
    font-size: 16px;
    color: #222;
}

/* Add to Cart Button */
.add-to-cart-btn a.button {
    display: block;
    width: 100%;
    padding: 10px 0;
    background: #000;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    border-radius: 4px;
    text-align: center;
    transition: background 0.3s ease;
}

.add-to-cart-btn a.button:hover {
    background: #c19a6b;
    color: #fff;
}


/* Price Container */
.price-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 8px;
    font-family: Arial, sans-serif;
}

/* Current Price (when no sale) */
.current-price {
    font-size: 18px;
    font-weight: 700;
    color: #111;
    margin-bottom: 4px;
}

/* Old Price (strike-through) */
.old-price {
    text-decoration: line-through;
    color: #999;
    font-size: 14px;
    margin-right: 6px;
}

/* New Price */
.new-price {
    color: #111;
    font-weight: 700;
    font-size: 18px;
}

/* Discount Badge */
.discount {
    color: #ff5722;
    font-size: 14px;
    font-weight: 600;
    margin-left: 8px;
}

/* Additional Info */
.price-info {
    font-size: 12px;
    color: #777;
    margin-top: 4px;
}

/*cart page */

.custom-cart-container {
    display: flex;
    gap: 30px;
    max-width: 1200px;
    margin: 40px auto;
}
.custom-cart-left {
    flex: 2;
}
.custom-cart-right {
    flex: 1;
    background: #fff;
    padding: 20px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
}
.cart-item-card {
    display: flex;
    gap: 15px;
    background: #fff;
    border: 1px solid #e0e0e0;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 15px;
}
.item-image img {
    width: 100px;
    border-radius: 8px;
}
.item-details h3 a {
    margin: 0;
    font-size: 16px;
    text-decoration: none;
    color: #333;
}
.item-price {
    color: #333;
    font-weight: bold;
    margin: 8px 0;
}
.item-quantity input {
    width: 50px;
    text-align: center;
}
.item-actions a {
    font-size: 14px;
    color: #ff3f6c;
    text-decoration: none;
}
.update-cart-btn, .checkout-btn, .apply-coupon-btn {
    background: #ff3f6c;
    color: #fff;
    padding: 12px 20px;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    display: inline-block;
    text-align: center;
    margin-top: 20px;
    text-decoration: none;
    cursor: pointer;
}
.coupon-section {
    display: flex;
    gap: 10px;
    margin: 15px 0;
}
.coupon-section input {
    flex: 1;
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
}
.price-summary p {
    margin: 8px 0;
}
.cart-loader {
    padding: 10px 0;
    color: #444;
    font-size: 14px;
}
