/* Smart Cards Styling for OffBD Categories */

/* Grid Wrapper Styling - removing default tight margins and split line */
.smart-products-grid {
    display: flex;
    flex-wrap: wrap;
    margin: -10px !important; /* Counteract padding to align grid */
    padding: 10px 0;
}

.smart-products-grid .product-wrap {
    padding: 10px !important;
    box-sizing: border-box;
    display: flex;
}

/* Card Styling */
.smart-products-grid .product {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
    border: 1px solid rgba(0, 0, 0, 0.06);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    width: 100%;
    position: relative;
}

/* Hover State */
.smart-products-grid .product:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.12);
    border-color: rgba(60, 99, 164, 0.2); /* matches theme blue code #3C63A4 */
}

/* Image Wrapper */
.smart-products-grid .product-media {
    position: relative;
    overflow: hidden;
    background-color: #f7f8fa;
    margin-bottom: 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.smart-products-grid .product-media img {
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.25, 0.8, 0.25, 1);
    display: block;
}

/* Zoom Image on Hover */
.smart-products-grid .product:hover .product-media img {
    transform: scale(1.06);
}

/* Custom Label/Badge (Discount) */
.smart-products-grid .product-label-group {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 5;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.smart-products-grid .product-label.label-sale {
    background: linear-gradient(135deg, #e53e3e, #c53030);
    color: #ffffff;
    font-weight: 700;
    font-size: 11px;
    text-transform: uppercase;
    padding: 6px 12px;
    border-radius: 20px;
    box-shadow: 0 4px 8px rgba(229, 62, 62, 0.3);
    border: none;
    letter-spacing: 0.5px;
}

/* Smart Action Row / Cart System on Hover */
.smart-products-grid .product-action-row {
    position: absolute;
    bottom: -55px;
    left: 0;
    right: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(8px);
    transition: bottom 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    z-index: 5;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.smart-products-grid .product:hover .product-action-row {
    bottom: 0;
}

/* View Offer Button */
.smart-products-grid .btn-view-offer {
    flex-grow: 1;
    background-color: #3C63A4;
    color: #ffffff !important;
    font-weight: 600;
    font-size: 13px;
    padding: 9px 12px;
    border-radius: 6px;
    text-decoration: none;
    text-align: center;
    border: none;
    transition: background-color 0.2s ease, transform 0.2s ease;
    box-shadow: 0 2px 6px rgba(60, 99, 164, 0.2);
}

.smart-products-grid .btn-view-offer:hover {
    background-color: #2b4b80;
    transform: translateY(-1px);
}

/* Quick Cart/Bag Button */
.smart-products-grid .btn-quick-cart {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    background-color: #05b895; /* Accent/Green tone for cart actions */
    color: #ffffff !important;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    font-size: 15px;
    transition: background-color 0.2s ease, transform 0.2s ease;
    box-shadow: 0 2px 6px rgba(5, 184, 149, 0.2);
}

.smart-products-grid .btn-quick-cart:hover {
    background-color: #049f80;
    transform: translateY(-1px);
}

.smart-products-grid .btn-quick-cart i {
    font-weight: bold;
    margin: 0;
}

/* Product Details Section */
.smart-products-grid .product-details {
    padding: 18px 15px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    justify-content: space-between;
    text-align: left;
    background: #ffffff;
}

/* Product Title */
.smart-products-grid .product-name {
    font-size: 14px;
    font-weight: 600;
    color: #222222;
    line-height: 1.4;
    margin: 0 0 10px 0;
    height: 40px; /* limits to 2 lines approximately */
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.smart-products-grid .product-name a {
    color: inherit;
    transition: color 0.2s ease;
}

.smart-products-grid .product-name a:hover {
    color: #3C63A4;
}

/* Product Pricing */
.smart-products-grid .product-price {
    display: flex;
    align-items: baseline;
    gap: 8px;
    font-size: 16px;
    margin-bottom: 0;
}

.smart-products-grid .new-price {
    font-weight: 700;
    color: #3C63A4;
    font-size: 17px;
}

.smart-products-grid .old-price {
    text-decoration: line-through;
    color: #888888 !important;
    font-size: 13px;
}

/* Responsive adjustment for grid columns */
@media (max-width: 575px) {
    .smart-products-grid .product-wrap {
        width: 50% !important; /* 2 columns on mobile */
    }
}
@media (min-width: 576px) and (max-width: 991px) {
    .smart-products-grid .product-wrap {
        width: 33.333% !important; /* 3 columns on tablet */
    }
}
@media (min-width: 992px) {
    .smart-products-grid .product-wrap {
        width: 33.333% !important; /* 3 columns on desktop sidebar page */
    }
}

/* Smart Background and Page Layout Styles */
main.bt-lg-none {
    background-color: #f6f8fb !important;
}

/* Sidebar Smart Design */
.sidebar-content {
    background-color: #ffffff;
    border-radius: 14px;
    padding: 24px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.sidebar-content .widget-title {
    font-size: 1.6rem !important;
    font-weight: 700 !important;
    border-bottom: 2px solid #f0f2f5;
    padding-bottom: 12px;
    margin-bottom: 15px;
}

.sidebar-content .filter-items {
    padding-left: 15px !important;
}

.sidebar-content .filter-items ul {
    padding-left: 15px !important;
}

.sidebar-content .filter-items li {
    padding: 8px 0;
    border-bottom: 1px solid #f8fafc;
}

.sidebar-content .filter-items li a {
    font-weight: 500;
    color: #4a5568;
    transition: color 0.2s ease;
}

.sidebar-content .filter-items li a:hover {
    color: #3C63A4;
}

/* Support for non-hover touch screens (Mobile) */
@media (max-width: 767px) {
    .smart-products-grid .product-action-row {
        position: static !important;
        background: #ffffff !important;
        padding: 10px 15px !important;
        bottom: 0 !important;
        border-top: none !important;
    }
    
    .smart-products-grid .product-media {
        border-bottom: none !important;
    }
}

/* --- Single Product Smart Redesign --- */
main.single-product {
    background-color: #f6f8fb !important;
}

main.single-product .product-single {
    background: #ffffff;
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.04);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.product-details-container {
    padding-left: 10px;
}

.product-details-container .product-title-custom {
    font-size: 2.8rem;
    font-weight: 700;
    color: #1a202c;
    line-height: 1.25;
    margin-bottom: 12px;
}

.product-details-container .shop-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background-color: #ebf8ff;
    color: #2b6cb0;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 24px;
}

.product-details-container .shop-link {
    color: #2b6cb0 !important;
    text-decoration: underline;
}

.product-details-container .product-price-section {
    margin-bottom: 24px;
}

.product-details-container .price-row {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.product-details-container .price-current {
    font-size: 3.2rem;
    font-weight: 800;
    color: #3C63A4;
}

.product-details-container .price-original {
    font-size: 1.8rem;
    color: #718096;
    text-decoration: line-through;
}

.product-details-container .badge-save {
    background-color: #c6f6d5;
    color: #22543d;
    font-size: 1.2rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Offer Duration Card */
.product-details-container .offer-duration-card {
    background-color: #f7fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 16px;
    margin-bottom: 28px;
}

.product-details-container .duration-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: #4a5568;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.product-details-container .duration-dates {
    display: flex;
    align-items: center;
    gap: 16px;
}

.product-details-container .date-block {
    display: flex;
    flex-direction: column;
}

.product-details-container .date-label {
    font-size: 1.1rem;
    color: #718096;
    text-transform: uppercase;
}

.product-details-container .date-value {
    font-size: 1.5rem;
    font-weight: 600;
    color: #2d3748;
}

.product-details-container .date-block.text-danger .date-value {
    color: #e53e3e;
}

.product-details-container .date-separator {
    color: #a0aec0;
}

/* Action Buttons */
.product-details-container .product-action-buttons {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
}

.product-details-container .btn-action-primary {
    flex-grow: 1;
    background-color: #3C63A4;
    color: #ffffff !important;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 48px;
    font-size: 1.5rem;
    font-weight: 600;
    border-radius: 8px;
    border: none;
    box-shadow: 0 4px 12px rgba(60, 99, 164, 0.2);
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.product-details-container .btn-action-primary:hover {
    background-color: #2b4b80;
    transform: translateY(-1px);
}

.product-details-container .btn-action-secondary {
    flex-grow: 1;
    background-color: #ffffff;
    color: #4a5568 !important;
    border: 1px solid #cbd5e0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 48px;
    font-size: 1.5rem;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.product-details-container .btn-action-secondary:hover {
    background-color: #f7fafc;
    border-color: #a0aec0;
    transform: translateY(-1px);
}

/* Shop Contact Card */
.product-details-container .shop-contact-card {
    background-color: #fffaf0;
    border: 1px solid #feebc8;
    border-radius: 12px;
    padding: 20px;
    margin-top: 16px;
    box-shadow: 0 4px 12px rgba(221, 107, 32, 0.05);
}

.product-details-container .contact-card-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: #dd6b20;
    margin-bottom: 15px;
    border-bottom: 1px solid #fbd38d;
    padding-bottom: 8px;
}

.product-details-container .contact-items {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.product-details-container .contact-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.product-details-container .contact-item i {
    font-size: 1.6rem;
    color: #dd6b20;
    margin-top: 2px;
}

.product-details-container .contact-item strong {
    font-size: 1.3rem;
    color: #4a5568;
    display: block;
}

.product-details-container .contact-item span {
    font-size: 1.3rem;
    color: #2d3748;
}

.product-details-container .contact-item a {
    color: #2b6cb0 !important;
    text-decoration: underline;
}

/* --- Product Description Card styling --- */
.product-description-card {
    background: #ffffff;
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.04);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.product-description-card .description-heading {
    font-size: 2rem;
    font-weight: 700;
    color: #2d3748;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
    border-bottom: 2px solid #f0f2f5;
    padding-bottom: 12px;
}

.product-description-card .description-content {
    font-size: 1.5rem;
    line-height: 1.8;
    color: #4a5568;
}

/* --- Related Products Carousel Styling --- */
.smart-related-carousel .product {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
    border: 1px solid rgba(0, 0, 0, 0.06);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    width: 100%;
    position: relative;
}

.smart-related-carousel .product:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.12);
    border-color: rgba(60, 99, 164, 0.2);
}

.smart-related-carousel .product-media {
    position: relative;
    overflow: hidden;
    background-color: #f7f8fa;
    margin-bottom: 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.smart-related-carousel .product-media img {
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.25, 0.8, 0.25, 1);
    display: block;
}

.smart-related-carousel .product:hover .product-media img {
    transform: scale(1.06);
}

.smart-related-carousel .product-details {
    padding: 15px;
    text-align: left;
    background: #ffffff;
}

.smart-related-carousel .product-name {
    font-size: 13px;
    font-weight: 600;
    color: #222222;
    line-height: 1.4;
    margin: 0 0 8px 0;
    height: 36px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.smart-related-carousel .product-price {
    display: flex;
    align-items: baseline;
    gap: 6px;
    font-size: 14px;
}

.smart-related-carousel .product-action-row {
    position: absolute;
    bottom: -55px;
    left: 0;
    right: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(8px);
    transition: bottom 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    z-index: 5;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.smart-related-carousel .product:hover .product-action-row {
    bottom: 0;
}

.smart-related-carousel .btn-view-offer {
    flex-grow: 1;
    background-color: #3C63A4;
    color: #ffffff !important;
    font-weight: 600;
    font-size: 12px;
    padding: 7px 10px;
    border-radius: 6px;
    text-decoration: none;
    text-align: center;
    border: none;
    transition: background-color 0.2s ease, transform 0.2s ease;
    box-shadow: 0 2px 6px rgba(60, 99, 164, 0.2);
}

.smart-related-carousel .btn-view-offer:hover {
    background-color: #2b4b80;
    transform: translateY(-1px);
}

.smart-related-carousel .btn-quick-cart {
    flex-shrink: 0;
    width: 30px;
    height: 30px;
    background-color: #05b895;
    color: #ffffff !important;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    font-size: 13px;
    transition: background-color 0.2s ease, transform 0.2s ease;
    box-shadow: 0 2px 6px rgba(5, 184, 149, 0.2);
}

.smart-related-carousel .btn-quick-cart:hover {
    background-color: #049f80;
    transform: translateY(-1px);
}

.smart-related-carousel .btn-quick-cart i {
    font-weight: bold;
    margin: 0;
}

@media (max-width: 767px) {
    .smart-related-carousel .product-action-row {
        position: static !important;
        background: #ffffff !important;
        padding: 8px 12px !important;
        bottom: 0 !important;
        border-top: none !important;
    }
}
