/* Global Components CSS - Consistent styling across all pages */

/* Mobile Menu Additional Styling for Consistency */
@media (max-width: 768px) {

    /* Ensure top bar is hidden on all pages on mobile */
    .top-bar {
        display: none !important;
    }

    /* Adjust site header positioning for all pages */
    .site-header {
        position: sticky !important;
        top: 0 !important;
    }

    /* Mobile menu enhancements for all pages */
    .mobile-contact-info {
        background-color: #ffffff;
        border: 1px solid #e0e0e0;
        border-radius: 8px;
        padding: 20px 15px;
        margin: 50px 0 25px 0;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    }

    .mobile-contact-item {
        display: flex;
        align-items: center;
        gap: 12px;
        margin-bottom: 15px;
        font-family: 'Century Gothic', sans-serif;
        font-size: 14px;
        font-weight: 400;
        color: #333;
    }

    .mobile-contact-item:last-child {
        margin-bottom: 0;
    }

    .mobile-contact-item i {
        font-size: 16px;
        color: #0B926A;
        width: 20px;
        text-align: center;
        flex-shrink: 0;
    }

    /* Mobile navigation consistency */
    .mobile-nav a {
        font-family: 'Century Gothic', sans-serif !important;
        font-size: 18px !important;
        font-weight: 600 !important;
        text-transform: uppercase !important;
        letter-spacing: 0.5px !important;
        color: #333 !important;
        padding: 12px 0 !important;
        transition: all 0.3s ease !important;
    }

    .mobile-nav a:hover {
        color: #0B926A !important;
        padding-left: 5px !important;
    }

    /* Mobile social links consistency */
    .mobile-social-links {
        margin-top: 35px !important;
        padding-top: 25px !important;
        border-top: 1px solid #f0f0f0 !important;
        display: flex !important;
        gap: 15px !important;
        justify-content: center !important;
    }

    .mobile-social-links a {
        width: 42px !important;
        height: 42px !important;
        background-color: #f8f9fa !important;
        border-radius: 50% !important;
        color: #333 !important;
        font-size: 18px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        transition: all 0.3s ease !important;
        text-decoration: none !important;
    }

    .mobile-social-links a:hover {
        background-color: #0B926A !important;
        color: #fff !important;
        transform: translateY(-3px) !important;
        box-shadow: 0 4px 8px rgba(11, 146, 106, 0.3) !important;
    }
}

/* Page Headers */
.page-header,
.archive-header {
    background: linear-gradient(135deg, #1a1a1a 0%, #2c2c2c 100%);
    color: white;
    padding: 60px 0;
    text-align: center;
    margin-bottom: 0;
}

.page-title,
.archive-title {
    font-size: 48px;
    font-weight: 700;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: white;
}

.page-subtitle,
.archive-subtitle {
    font-size: 18px;
    color: #ccc;
    margin-top: 15px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* Section Headers */
.section-header {
    text-align: center;
    margin-bottom: 50px;
}

.section-title {
    font-size: 36px;
    font-weight: 700;
    color: #333;
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.section-subtitle {
    font-size: 16px;
    color: #666;
    margin: 0;
    line-height: 1.6;
}

/* Breadcrumbs */
.breadcrumbs {
    background-color: #f8f9fa;
    padding: 15px 0;
    border-bottom: 1px solid #eee;
}

.breadcrumbs nav {
    font-size: 14px;
}

.breadcrumbs a {
    color: #666;
    text-decoration: none;
    transition: color 0.3s ease;
}

.breadcrumbs a:hover {
    color: #1fa857;
}

.breadcrumbs .separator {
    margin: 0 8px;
    color: #999;
}

.breadcrumbs .current {
    color: #1fa857;
    font-weight: 500;
}

/* Forms */
.form-container {
    background: white;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    max-width: 500px;
    margin: 0 auto;
}

.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
    font-size: 14px;
}

.form-control {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #eee;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.3s ease;
    outline: none;
}

.form-control:focus {
    border-color: #1fa857;
}

.form-text {
    font-size: 12px;
    color: #666;
    margin-top: 5px;
}

.form-error {
    color: #dc3545;
    font-size: 12px;
    margin-top: 5px;
}

.form-success {
    color: #28a745;
    font-size: 12px;
    margin-top: 5px;
}

/* Tables */
.table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}

.table th,
.table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.table th {
    background-color: #f8f9fa;
    font-weight: 600;
    color: #333;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.table tbody tr:hover {
    background-color: #f8f9fa;
}

/* Alerts */
.alert {
    padding: 15px 20px;
    border-radius: 6px;
    margin-bottom: 20px;
    border: 1px solid transparent;
}

.alert-success {
    background-color: #d4edda;
    border-color: #c3e6cb;
    color: #155724;
}

.alert-error,
.alert-danger {
    background-color: #f8d7da;
    border-color: #f5c6cb;
    color: #721c24;
}

.alert-warning {
    background-color: #fff3cd;
    border-color: #ffeaa7;
    color: #856404;
}

.alert-info {
    background-color: #d1ecf1;
    border-color: #bee5eb;
    color: #0c5460;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin: 40px 0;
}

.pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    border-radius: 8px;
    background-color: #f8f9fa;
    color: #666;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.pagination .page-numbers:hover {
    background-color: #1fa857;
    color: white;
    border-color: #1fa857;
    transform: translateY(-2px);
}

.pagination .page-numbers.current {
    background-color: #1fa857;
    color: white;
    border-color: #1fa857;
}

.pagination .prev,
.pagination .next {
    font-size: 14px;
    padding: 0 15px;
    width: auto;
}

/* Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: white;
    border-radius: 8px;
    padding: 30px;
    max-width: 90%;
    max-height: 90%;
    overflow-y: auto;
    position: relative;
    transform: scale(0.8);
    transition: transform 0.3s ease;
}

.modal-overlay.active .modal-content {
    transform: scale(1);
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: transparent;
    border: none;
    font-size: 24px;
    color: #666;
    cursor: pointer;
    transition: color 0.3s ease;
}

.modal-close:hover {
    color: #333;
}

/* Tabs */
.tabs-container {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.tabs-nav {
    display: flex;
    background-color: #f8f9fa;
    border-bottom: 1px solid #eee;
}

.tab-button {
    flex: 1;
    padding: 15px 20px;
    border: none;
    background: transparent;
    color: #666;
    font-weight: 600;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all 0.3s ease;
    border-bottom: 3px solid transparent;
}

.tab-button.active {
    color: #1fa857;
    border-bottom-color: #1fa857;
    background-color: white;
}

.tab-button:hover {
    color: #1fa857;
}

.tab-content {
    padding: 30px;
    display: none;
}

.tab-content.active {
    display: block;
}

/* Cards */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.info-card {
    background: white;
    border-radius: 8px;
    padding: 30px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.info-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.info-card .icon {
    width: 60px;
    height: 60px;
    background-color: #1fa857;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    color: white;
    font-size: 24px;
}

.info-card h3 {
    font-size: 20px;
    margin-bottom: 15px;
    color: #333;
}

.info-card p {
    color: #666;
    line-height: 1.6;
}

/* Loading States & Animations */
.reveal-on-scroll {
    opacity: 0;
    transform: translateX(-30px);
    transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1), transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: opacity, transform;
}

.reveal-on-scroll.animate-in {
    opacity: 1;
    transform: translateX(0);
}

/* Base style for cards that will animate */
.product-card,
.category-card,
.info-card,
.testimonial-card,
.blog-card {
    opacity: 0;
    transform: translateX(-30px);
    transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1), transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: opacity, transform;
}

.product-card.animate-in,
.category-card.animate-in,
.info-card.animate-in,
.testimonial-card.animate-in,
.blog-card.animate-in {
    opacity: 1;
    transform: translateX(0);
}

.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #1fa857;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.9);
    z-index: 9998;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 20px;
}

.loading-overlay .loading-spinner {
    width: 40px;
    height: 40px;
    border-width: 4px;
}

/* Progress Bar */
.progress-bar {
    width: 100%;
    height: 8px;
    background-color: #f0f0f0;
    border-radius: 4px;
    overflow: hidden;
    margin: 10px 0;
}

.progress-fill {
    height: 100%;
    background-color: #1fa857;
    border-radius: 4px;
    transition: width 0.3s ease;
}

/* Responsive Design */
@media (max-width: 768px) {

    .page-title,
    .archive-title {
        font-size: 32px;
    }

    .section-title {
        font-size: 28px;
    }

    .form-container {
        padding: 20px;
        margin: 0 15px;
    }

    .card-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .tabs-nav {
        flex-direction: column;
    }

    .modal-content {
        padding: 20px;
        margin: 20px;
    }

    .pagination .page-numbers {
        width: 40px;
        height: 40px;
    }
}

@media (max-width: 480px) {

    .page-title,
    .archive-title {
        font-size: 24px;
    }

    .section-title {
        font-size: 22px;
    }

    .page-header,
    .archive-header {
        padding: 40px 0;
    }

    .info-card {
        padding: 20px;
    }

    .info-card .icon {
        width: 50px;
        height: 50px;
        font-size: 20px;
    }
}

/* ================================================================= */
/* UNIVERSAL PRODUCT CARD REDESIGN (TEMU / TOMI WATCHES STYLE)      */
/* ================================================================= */

/* Global Card Styling */
.product-card {
    background: #ffffff !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    padding: 0 !important;
    margin-bottom: 15px !important;
    display: flex;
    flex-direction: column;
    height: auto !important;
    transition: all 0.2s ease-in-out !important;
    position: relative;
    cursor: pointer;
}

.product-card:hover {
    transform: none !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08) !important;
}

/* Image Container - Square Aspect Ratio */
.product-card .product-image {
    width: 100% !important;
    aspect-ratio: 1 / 1 !important;
    height: auto !important;
    padding-bottom: 0 !important;
    margin-bottom: 8px !important;
    overflow: hidden;
    position: relative !important;
    background-color: #f7f7f7 !important;
    border-radius: 0 !important;
}

.product-card .product-image img {
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    transform: translate(-50%, -50%) !important;
    transition: transform 0.3s ease !important;
}

.product-card:hover .product-image img {
    transform: translate(-50%, -50%) scale(1.05) !important;
}

/* Sale Badge - Tomi Watches Style */
.product-card .sale-badge {
    position: absolute !important;
    bottom: 12px !important;
    left: 12px !important;
    background-color: #334FB4 !important;
    color: #ffffff !important;
    padding: 3px 12px !important;
    font-size: 11px !important;
    font-weight: 500 !important;
    border-radius: 40px !important;
    z-index: 5 !important;
    text-transform: uppercase !important;
    line-height: 1.5 !important;
}

/* Product Info */
.product-card .product-info,
.product-card .product-content {
    padding: 0 8px 8px !important;
    text-align: left !important;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    background: transparent !important;
}

/* Product Title */
.product-card .product-title {
    font-family: 'Assistant', sans-serif !important;
    font-size: 15px !important;
    font-weight: 400 !important;
    color: #000000 !important;
    margin: 0 0 4px 0 !important;
    padding: 0 !important;
    line-height: 1.4 !important;
    text-transform: none !important;
    letter-spacing: normal !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 3 !important;
    line-clamp: 3 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
    white-space: normal !important;
    word-break: break-word !important;
    overflow-wrap: anywhere !important;
    width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
}

.product-card .product-title a {
    color: #000000 !important;
    text-decoration: none !important;
}

.product-card:hover .product-title a {
    text-decoration: underline !important;
}

/* Product Price */
.product-card .product-price {
    display: flex !important;
    align-items: center !important;
    flex-wrap: wrap !important;
    gap: 8px !important;
    margin-top: 0 !important;
    font-family: 'Assistant', sans-serif !important;
}

.product-card .price-sale {
    font-size: 18px !important;
    font-weight: 600 !important;
    color: #000000 !important;
}

.product-card .price-sale .woocommerce-Price-amount {
    color: #000000 !important;
}

.product-card .price-regular {
    font-size: 13px !important;
    font-weight: 400 !important;
    color: rgba(0, 0, 0, 0.4) !important;
    text-decoration: line-through !important;
}

/* Hide legacy elements on universal cards */
.product-card .btn-shop,
.product-card .btn-shop-hidden {
    display: none !important;
}

/* Universal Grid System Overrides */
.featured-products-grid,
.popular-products-grid,
.related-products-grid,
#products-grid {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 15px !important;
    padding: 15px !important;
    width: 100% !important;
    margin: 0 auto !important;
    box-sizing: border-box !important;
    min-height: 400px;
    /* Prevent layout shift while loading */
}

@media (min-width: 768px) {

    .featured-products-grid,
    .popular-products-grid,
    .related-products-grid,
    #products-grid {
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 20px !important;
    }
}

@media (min-width: 1024px) {

    .featured-products-grid,
    .popular-products-grid,
    .related-products-grid,
    #products-grid {
        grid-template-columns: repeat(4, 1fr) !important;
        gap: 30px !important;
    }

    .product-card .product-title {
        font-size: 16px !important;
    }
}

@media (max-width: 480px) {

    .featured-products-grid,
    .popular-products-grid,
    .related-products-grid,
    #products-grid {
        gap: 8px !important;
        padding: 10px !important;
    }

    .product-card {
        margin-bottom: 8px !important;
    }

    .product-card .product-image {
        margin-bottom: 6px !important;
    }

    .product-card .product-info {
        padding: 0 5px 2px !important;
    }

    .product-card .product-title {
        font-size: 13px !important;
        margin-bottom: 2px !important;
    }

    .product-card .price-sale {
        font-size: 15px !important;
    }
}