/* Products Listing & Details Pages */

.products-page {
    padding-top: 90px;
    padding-bottom: 60px;
    background: radial-gradient(circle at top, rgba(140, 82, 255, 0.12), transparent 55%);
    min-height: 100vh;
}

.products-hero {
    padding: 60px 0 30px;
    text-align: center;
}

.products-hero .hero-inner {
    max-width: 760px;
    margin: 0 auto;
}

.products-hero h1 {
    font-size: clamp(28px, 4vw, 40px);
    margin-bottom: 12px;
}

.products-hero p {
    color: var(--gray-medium);
    margin-bottom: 20px;
}

.products-hero .hero-actions {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

/* Currency switcher (copied from main style, adapted for products pages) */

.currency-switcher {
    position: fixed;
    top: 60px;
    right: 20px;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(10px);
    border-radius: 30px;
    padding: 8px 15px;
    display: flex;
    gap: 10px;
    align-items: center;
}

.currency-switcher .currency-badge {
    font-size: 13px;
    font-weight: 600;
    color: var(--neon-yellow);
    background: rgba(0, 0, 0, 0.3);
    padding: 4px 10px;
    border-radius: 20px;
}

.currency-switcher select {
    background: transparent;
    border: none;
    color: var(--secondary-color);
    font-size: 14px;
    cursor: pointer;
    padding: 5px 10px;
    border-radius: 20px;
    outline: none;
}

.currency-switcher select option {
    background: var(--gray-dark);
    color: var(--secondary-color);
}

/* Filters */

.products-filters-section {
    margin-bottom: 30px;
}

.products-filters {
    background: rgba(15, 23, 42, 0.9);
    border-radius: var(--border-radius);
    border: 1px solid rgba(255, 255, 255, 0.06);
    padding: 18px 16px;
    box-shadow: var(--box-shadow);
}

.filters-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 16px;
    align-items: end;
}

.filter-group label {
    display: block;
    margin-bottom: 6px;
    font-size: 13px;
    color: var(--gray-medium);
}

.filter-group select,
.filter-group input[type="search"] {
    width: 100%;
    padding: 10px 12px;
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.35);
    background: rgba(15, 23, 42, 0.85);
    color: var(--secondary-color);
    font-size: 14px;
}

.filter-group select:focus,
.filter-group input[type="search"]:focus {
    outline: none;
    border-color: var(--neon-blue);
    box-shadow: 0 0 0 1px rgba(0, 243, 255, 0.35);
}

.filter-group select:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Products grid */

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 22px;
}

.product-card.skeleton {
    cursor: default;
}

.product-card.skeleton .product-image {
    height: 210px;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0.10), rgba(255, 255, 255, 0.02));
    background-size: 200% 100%;
    animation: skeleton-loading 1.4s ease-in-out infinite;
}

.product-card.skeleton .product-info {
    gap: 10px;
}

.skeleton-line {
    width: 100%;
    height: 10px;
    border-radius: 999px;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0.10), rgba(255, 255, 255, 0.02));
    background-size: 200% 100%;
    animation: skeleton-loading 1.4s ease-in-out infinite;
}

.skeleton-line.sm {
    width: 40%;
}

.skeleton-line.md {
    width: 65%;
}

.skeleton-line.lg {
    width: 85%;
    height: 14px;
}

@keyframes skeleton-loading {
    0% {
        background-position: -200px 0;
    }
    100% {
        background-position: 200px 0;
    }
}

.product-card {
    background: #0b0b0f;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--box-shadow);
    transition: var(--transition);
    cursor: pointer;
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.9);
}

.product-image {
    position: relative;
    height: 210px;
    overflow: hidden;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.25s ease;
}

.product-card:hover .product-image img {
    transform: scale(1.06);
}

.product-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: var(--neon-pink);
    color: var(--primary-color);
    padding: 5px 11px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
}

.product-actions-top {
    position: absolute;
    top: 12px;
    left: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.circle-btn {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(15, 23, 42, 0.8);
    color: var(--secondary-color);
    cursor: pointer;
    transition: var(--transition);
    font-size: 14px;
}

.circle-btn:hover {
    background: var(--accent-color);
    box-shadow: 0 0 12px rgba(140, 82, 255, 0.7);
}

.wishlist-btn.active {
    color: #ff4b8b;
}

.product-info {
    padding: 14px 14px 16px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.product-category {
    font-size: 12px;
    color: var(--neon-blue);
}

.product-name {
    font-size: 15px;
    font-weight: 600;
}

.product-rating {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--gray-medium);
}

.product-rating i {
    color: #facc15;
}

.product-price {
    margin-top: 4px;
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.product-price .current-price {
    font-weight: 700;
    font-size: 15px;
}

.product-price .original-price {
    font-size: 12px;
    color: var(--gray-medium);
    text-decoration: line-through;
}

.product-actions {
    margin-top: 10px;
    display: flex;
    gap: 8px;
}

.product-actions .add-to-cart,
.product-actions .buy-now {
    flex: 1;
    border-radius: 999px;
    border: none;
    padding: 9px 0;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.product-actions .add-to-cart {
    background: rgba(148, 163, 184, 0.12);
    color: var(--secondary-color);
}

.product-actions .buy-now {
    background: linear-gradient(120deg, var(--neon-blue), var(--neon-pink));
    color: var(--primary-color);
}

.product-actions .add-to-cart:hover {
    background: rgba(148, 163, 184, 0.3);
}

.product-actions .buy-now:hover {
    transform: translateY(-1px);
}

/* Details page */

.product-details-page {
    padding-top: 90px;
    padding-bottom: 60px;
}

.product-details-wrapper {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.1fr);
    gap: 30px;
    align-items: flex-start;
}

.details-gallery-main {
    border-radius: var(--border-radius);
    overflow: hidden;
    background: rgba(15, 23, 42, 0.95);
}

.details-gallery-main img {
    width: 100%;
    height: 340px;
    object-fit: cover;
}

.details-thumbnails {
    display: flex;
    gap: 8px;
    margin-top: 10px;
    flex-wrap: wrap;
}

.details-thumbnails img {
    width: 70px;
    height: 70px;
    object-fit: cover;
    border-radius: 10px;
    cursor: pointer;
    opacity: 0.7;
    border: 2px solid transparent;
    transition: var(--transition);
}

.details-thumbnails img.active {
    opacity: 1;
    border-color: var(--neon-blue);
}

.product-details-info {
    background: rgba(15, 23, 42, 0.96);
    border-radius: var(--border-radius);
    padding: 20px 20px 18px;
    border: 1px solid rgba(148, 163, 184, 0.35);
}

.product-details-info .product-detail-category {
    font-size: 13px;
    color: var(--neon-blue);
    margin-bottom: 4px;
}

.product-details-info h1 {
    font-size: 22px;
    margin-bottom: 8px;
}

.product-details-info .product-detail-rating {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--gray-medium);
    margin-bottom: 10px;
}

.product-details-info .product-detail-price {
    font-size: 20px;
    font-weight: 700;
    margin: 10px 0;
}

.product-details-info .product-detail-description {
    font-size: 14px;
    color: var(--gray-light);
    margin-bottom: 14px;
}

.product-details-info .detail-features {
    list-style: none;
    padding: 0;
    margin: 0 0 14px;
}

.product-details-info .detail-features li {
    font-size: 13px;
    color: var(--gray-light);
    margin-bottom: 4px;
}

.product-details-info .detail-features i {
    color: var(--neon-green);
    margin-left: 6px;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--gray-medium);
    text-decoration: none;
    margin-bottom: 14px;
}

.back-link i {
    font-size: 11px;
}

.breadcrumbs {
    font-size: 13px;
    color: var(--gray-medium);
    margin-bottom: 12px;
}

.breadcrumbs a {
    color: var(--gray-medium);
    text-decoration: none;
}

.breadcrumbs a:hover {
    color: var(--neon-blue);
}

.breadcrumbs span.current {
    color: var(--secondary-color);
}

.similar-products {
    margin-top: 35px;
}

.similar-products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 18px;
}

/* Notification */

.notification {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    padding: 12px 22px;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.95);
    color: var(--secondary-color);
    border: 1px solid rgba(148, 163, 184, 0.6);
    display: none;
    z-index: 1200;
    font-size: 13px;
    min-width: 260px;
    text-align: center;
}

.notification.success {
    border-color: var(--neon-green);
}

.notification.error {
    border-color: var(--neon-pink);
}

/* Light theme overrides for products pages */

body[data-theme="light"] .products-page {
    background: radial-gradient(circle at top, rgba(148, 163, 184, 0.18), #f9fafb);
}

body[data-theme="light"] .product-card {
    background: #ffffff;
    color: var(--secondary-color);
    box-shadow: 0 14px 30px rgba(15, 23, 42, 0.12);
}

body[data-theme="light"] .product-info {
    color: var(--secondary-color);
}

body[data-theme="light"] .product-category {
    color: var(--accent-color);
}

body[data-theme="light"] .products-filters {
    background: rgba(255, 255, 255, 0.96);
    border-color: rgba(15, 23, 42, 0.08);
}

body[data-theme="light"] .filter-group label {
    color: var(--gray-dark);
}

body[data-theme="light"] .filter-group select,
body[data-theme="light"] .filter-group input[type="search"] {
    background: #f9fafb;
    color: var(--secondary-color);
    border-color: rgba(148, 163, 184, 0.5);
}

body[data-theme="light"] .product-details-page {
    background: radial-gradient(circle at top, rgba(148, 163, 184, 0.18), #f9fafb);
}

body[data-theme="light"] .product-details-info {
    background: #ffffff;
    border-color: rgba(148, 163, 184, 0.5);
}

body[data-theme="light"] .details-gallery-main {
    background: #e5e7eb;
}

body[data-theme="light"] .notification {
    background: rgba(15, 23, 42, 0.96);
    color: var(--secondary-color);
}

/* Light theme header/footer tweaks to match home page */

body[data-theme="light"] header {
    background: rgba(255, 255, 255, 0.92);
    border-bottom: 1px solid rgba(17, 24, 39, 0.08);
}

body[data-theme="light"] .header-scrolled {
    background: rgba(255, 255, 255, 0.96);
}

body[data-theme="light"] .cart-icon,
body[data-theme="light"] .user-icon,
body[data-theme="light"] .admin-icon,
body[data-theme="light"] .wishlist-icon,
body[data-theme="light"] .chat-icon,
body[data-theme="light"] .theme-toggle,
body[data-theme="light"] .mobile-menu-toggle {
    background: rgba(17, 24, 39, 0.08);
    color: var(--secondary-color);
}

body[data-theme="light"] .search-container form {
    background: var(--gray-light);
    box-shadow: 0 0 10px rgba(17, 24, 39, 0.12);
}

body[data-theme="light"] .search-container input {
    color: var(--secondary-color);
}

/* Header search suggestions for products listing */

.search-container {
    position: relative;
}

.search-suggestions {
    position: absolute;
    top: 110%;
    right: 0;
    width: 260px;
    max-height: 260px;
    overflow-y: auto;
    background: rgba(15, 23, 42, 0.98);
    border-radius: 16px;
    border: 1px solid rgba(148, 163, 184, 0.4);
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.9);
    display: none;
    z-index: 1200;
}

.search-suggestions.active {
    display: block;
}

.search-suggestion-item {
    padding: 10px 12px;
    cursor: pointer;
    border-bottom: 1px solid rgba(148, 163, 184, 0.25);
}

.search-suggestion-item:last-child {
    border-bottom: none;
}

.search-suggestion-item .title {
    font-size: 14px;
}

.search-suggestion-item .meta {
    font-size: 12px;
    color: var(--gray-medium);
}

.product-badge.badge-out-of-stock {
    background: var(--neon-pink);
}

.product-card .product-actions button.disabled,
.product-card .product-actions button:disabled,
.product-details-page .product-actions button.disabled,
.product-details-page .product-actions button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.stock-label.out-of-stock {
    margin-top: 8px;
    font-size: 14px;
    color: var(--neon-pink);
}

.product-reviews-section {
    padding: 40px 0;
}

.reviews-section {
    background: rgba(15, 23, 42, 0.9);
    border-radius: 18px;
    border: 1px solid rgba(148, 163, 184, 0.35);
    padding: 24px 20px;
    margin-top: 20px;
}

.reviews-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-bottom: 18px;
}

.reviews-summary-main {
    display: flex;
    align-items: center;
    gap: 14px;
}

.reviews-average {
    font-size: 2.4rem;
    font-weight: 700;
}

.reviews-stars i {
    color: var(--neon-yellow);
}

.reviews-count {
    font-size: 0.9rem;
    color: var(--gray-medium);
}

.review-item {
    border-top: 1px solid rgba(148, 163, 184, 0.25);
    padding: 12px 0;
}

.review-item:first-child {
    border-top: none;
}

.review-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    margin-bottom: 4px;
}

.review-author {
    font-weight: 600;
}

.review-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: var(--gray-medium);
}

.review-comment {
    margin: 0;
    color: var(--gray-light);
    font-size: 0.95rem;
}

.review-form {
    margin-top: 18px;
    border-top: 1px solid rgba(148, 163, 184, 0.35);
    padding-top: 14px;
}

.review-form h4 {
    margin-bottom: 10px;
}

.review-form .form-group {
    margin-bottom: 10px;
}

.rating-input .rating-stars i {
    cursor: pointer;
    color: var(--neon-yellow);
    font-size: 1.2rem;
}

.product-share {
    margin-top: 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.product-share-label {
    font-size: 0.95rem;
    color: var(--gray-medium);
}

.product-share-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.product-share-buttons .share-btn {
    width: 36px;
    height: 36px;
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.5);
    background: rgba(15, 23, 42, 0.9);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    color: var(--gray-light);
}

.product-share-buttons .share-btn:hover {
    background: var(--neon-blue);
    color: #0b1120;
}

body[data-theme="light"] footer {
    background: var(--gray-light);
    color: var(--secondary-color);
    border-color: rgba(17, 24, 39, 0.08);
    box-shadow: var(--box-shadow);
}

@media (max-width: 960px) {
    .product-details-wrapper {
        grid-template-columns: 1fr;
    }

    .products-page,
    .product-details-page {
        padding-top: 80px;
    }
}

@media (max-width: 640px) {
    .products-filters {
        padding: 14px 12px;
    }

    .product-image {
        height: 190px;
    }

    .details-gallery-main img {
        height: 260px;
    }
}

