/* React UI Re-implementation Overrides */

/* Navbar Centering & Topbar */
.pc-topbar {
    background-color: #111111 !important;
    color: #f9fafb !important;
}
.pc-navbar-main {
    justify-content: space-between !important;
}
.pc-search-wrap {
    margin: 0 auto !important;
    display: flex !important;
    justify-content: center !important;
    width: 100% !important;
}
.pc-search-form {
    max-width: 500px !important;
    width: 100%;
}
.pc-nav-actions {
    margin-left: 0 !important;
}
.pc-category-bar {
    border-bottom: 1px solid #f3f4f6 !important;
}

/* Product Cards */
.product_pod.shop-card, .shop-page-grid .shop-card {
    border-radius: 16px !important;
    border: 1px solid #e5e7eb !important;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03) !important;
    overflow: hidden !important;
    background-color: #ffffff !important;
    transition: all 0.2s ease-in-out !important;
}
.product_pod.shop-card:hover, .shop-page-grid .shop-card:hover {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05) !important;
    border-color: #d1d5db !important;
    transform: translateY(-2px) !important;
}

.shop-page-grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(200px, 260px)) !important;
    gap: 1.5rem !important;
    justify-content: start !important;
}

/* Ensure catalogue/search desktop views keep at least 3 cards per row. */
.shop-browse-body .shop-page-grid,
.shop-search-body .shop-page-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    justify-content: start !important;
}

.shop-browse-body .shop-page-grid .shop-page-card,
.shop-search-body .shop-page-grid .shop-page-card {
    width: 100% !important;
    max-width: none !important;
}

/* Match the homepage product grid to the catalogue layout. */
.homepage-products .shop-page-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    justify-content: start !important;
}

.homepage-products .shop-page-grid .shop-page-card {
    width: 100% !important;
    max-width: none !important;
}

@media (max-width: 1199px) {
    .shop-browse-body .shop-page-grid,
    .shop-search-body .shop-page-grid,
    .homepage-products .shop-page-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
}

@media (max-width: 575px) {
    .shop-browse-body .shop-page-grid,
    .shop-search-body .shop-page-grid,
    .homepage-products .shop-page-grid {
        grid-template-columns: minmax(0, 1fr) !important;
    }
}

.shop-card-media {
    border-radius: 15px 15px 0 0 !important;
}

.shop-card-body {
    padding: 1rem !important;
    background-color: #ffffff !important;
    gap: 0.5rem !important;
}

.shop-card-meta {
    font-size: 0.70rem !important;
    color: #6b7280 !important;
    margin-bottom: 0.15rem !important;
}

.shop-card-title a {
    font-size: 0.95rem !important;
    color: #111827 !important;
    font-weight: 500 !important;
}
.shop-card-title a:hover {
    color: #ef4444 !important;
}

/* Ratings */
.shop-card-rating {
    display: flex !important;
    align-items: center !important;
    gap: 0.35rem !important;
    margin-bottom: 0.25rem !important;
}
.shop-card-rating .star-rating i {
    color: #eab308 !important; /* Gold */
    font-size: 0.85rem !important;
    margin-right: 0.1rem !important;
}
.shop-card-rating-count {
    font-size: 0.75rem !important;
    color: #4b5563 !important;
    font-weight: 500 !important;
}

/* Pricing */
.shop-card-price-row {
    flex-wrap: wrap !important;
    align-items: center !important;
    margin-top: 0.5rem !important;
    gap: 0.5rem !important;
}
.shop-card-price {
    font-size: 1.25rem !important;
    font-weight: 700 !important;
    color: #111827 !important;
}
.shop-card-old-price {
    font-size: 0.85rem !important;
    color: #9ca3af !important;
    text-decoration: line-through !important;
    font-weight: 400 !important;
}

/* Warranty */
.shop-card-warranty {
    margin-top: 0.25rem !important;
    font-size: 0.75rem !important;
    color: #16a34a !important; /* Green */
}
.shop-card-warranty i {
    color: #16a34a !important;
}

/* Bottom Action */
.shop-card-actions {
    margin-top: auto !important;
    padding-top: 0.75rem !important;
    display: flex !important;
    justify-content: flex-end !important;
}
.shop-card-icon-btn {
    border-radius: 8px !important;
    width: 36px !important;
    height: 36px !important;
    background-color: #fee2e2 !important; /* Light red */
    color: #ef4444 !important; /* Red */
    border: none !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 0.9rem !important;
}
.shop-card-icon-btn:hover {
    background-color: #fecaca !important;
    color: #dc2626 !important;
    transform: scale(1.05) !important;
}

/* Sidebar Custom Overrides */
.shop-browse-sidebar.custom-sidebar {
    background-color: #ffffff !important;
    border: 1px solid #e5e7eb !important;
    border-radius: 12px !important;
    padding: 1.5rem !important;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05) !important;
    height: fit-content !important;
}

/* Category Bar Refinements */
.pc-category-bar-inner {
    padding: 0.25rem 0 !important;
    gap: 1.5rem !important;
}
.pc-category-bar .pc-cat-link {
    font-size: 0.9rem !important;
    font-weight: 500 !important;
    color: #6b7280 !important;
    transition: color 0.2s !important;
}
.pc-category-bar .pc-cat-link:hover {
    color: #111827 !important;
    box-shadow: none !important;
}
.pc-category-bar .pc-cat-link.active {
    color: #111827 !important;
    box-shadow: 0 2px 0 0 #ef4444 !important;
    border-radius: 0 !important;
}

.custom-sidebar .sidebar-filter-section h4,
.custom-sidebar h4.facet-title, 
.custom-sidebar .facet-title,
.custom-sidebar .nav-header {
    font-size: 0.95rem !important;
    font-weight: 600 !important;
    margin-bottom: 0.75rem !important;
    color: #111827 !important;
    text-transform: capitalize !important;
}
.custom-sidebar ul {
    padding-left: 0 !important;
    list-style: none !important;
    margin-bottom: 1.5rem !important;
}
.custom-sidebar label,
.facet-body label {
    display: flex !important;
    align-items: flex-start !important;
    gap: 0.6rem !important;
    cursor: pointer !important;
    font-size: 0.9rem !important;
    color: #4b5563 !important;
    margin-bottom: 0.6rem !important;
    line-height: 1.3 !important;
    font-weight: 500 !important;
}
.custom-sidebar input[type="checkbox"] {
    accent-color: #ef4444 !important;
    width: 1.1rem;
    height: 1.1rem;
    flex-shrink: 0 !important;
    margin-top: 0.1rem !important;
    border-radius: 4px;
    border: 1px solid #d1d5db;
    margin-right: 0 !important;
}
.pc-logo-icon {
    border-radius: 6px !important;
}

/* PDP detail tabs: match compact underlined tab style. */
.pdp-amz-page .pdp-detail-tabs {
    margin-top: 1.25rem !important;
    border-top: 1px solid #e2e8f0 !important;
    padding-top: 0.95rem !important;
}

.pdp-amz-page .pdp-tab-nav {
    display: flex !important;
    align-items: center !important;
    gap: 1.1rem !important;
    border-bottom: 1px solid #d7dee9 !important;
}

.pdp-amz-page .pdp-tab-btn {
    margin: 0 !important;
    padding: 0.7rem 1.6rem 0.65rem !important;
    border: 0 !important;
    border-radius: 0 !important;
    border-bottom: 2px solid transparent !important;
    background: transparent !important;
    box-shadow: none !important;
    color: #5b6b80 !important;
    font-size: 1rem !important;
    font-weight: 600 !important;
    line-height: 1.2 !important;
    transform: none !important;
}

.pdp-amz-page .pdp-tab-btn:hover {
    color: #ef0100 !important;
    background: transparent !important;
    box-shadow: none !important;
}

.pdp-amz-page .pdp-tab-btn.is-active {
    color: #ef0100 !important;
    border-bottom-color: #ef0100 !important;
}

.pdp-amz-page .pdp-tab-panels {
    padding: 1.15rem 0 0.2rem !important;
}

.pdp-amz-page .pdp-tab-panel {
    color: #56667c !important;
    font-size: 1rem !important;
    line-height: 1.6 !important;
}

.pdp-amz-page .pdp-tab-panel p {
    margin: 0 0 0.75rem !important;
}

.pdp-amz-page .pdp-tab-panel p:last-child {
    margin-bottom: 0 !important;
}

.pdp-amz-page .pdp-spec-list {
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
    display: grid !important;
    gap: 0.5rem !important;
}

.pdp-amz-page .pdp-spec-list li {
    padding: 0.5rem 0 !important;
    background: transparent !important;
    border-radius: 0 !important;
    border-bottom: 1px solid #eef2f7 !important;
}

@media (max-width: 767px) {
    .pdp-amz-page .pdp-tab-nav {
        gap: 0.35rem !important;
    }

    .pdp-amz-page .pdp-tab-btn {
        padding: 0.62rem 0.75rem !important;
        font-size: 0.97rem !important;
    }

    .pdp-amz-page .pdp-tab-panel {
        font-size: 1rem !important;
    }
}
