/* V-Commerce - Part 2: Components, Pages, Responsive */

/* Hero Slider */
.hero-slider {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #0f172a 0%, #1e3a5f 50%, #1a56db 100%);
}

.hero-slide {
    display: none;
    padding: 60px 0;
    animation: fadeSlide 0.6s ease-in-out;
}

.hero-slide.active {
    display: block;
}

@keyframes fadeSlide {
    from {
        opacity: 0;
        transform: translateX(30px)
    }

    to {
        opacity: 1;
        transform: translateX(0)
    }
}

.hero-content {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 20px;
    text-align: center;
    color: var(--white);
}

.hero-badge {
    display: inline-block;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(4px);
    padding: 6px 16px;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    margin-bottom: 16px;
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.hero-content h1 {
    font-size: clamp(1.75rem, 4vw, 3rem);
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 16px;
}

.hero-content p {
    font-size: 1.125rem;
    opacity: 0.85;
    max-width: 600px;
    margin: 0 auto 24px;
}

.hero-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

.hero-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    padding: 16px 0 24px;
}

.hero-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    border: none;
    cursor: pointer;
}

.hero-dot.active {
    background: var(--white);
    width: 28px;
    border-radius: var(--radius-full);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 24px;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 0.875rem;
    transition: var(--transition);
    border: 2px solid transparent;
    text-decoration: none;
    cursor: pointer;
    white-space: nowrap;
}

.btn-primary {
    background: var(--primary);
    color: var(--white);
}

.btn-primary:hover {
    background: var(--primary-dark);
    color: var(--white);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background: var(--secondary);
    color: var(--white);
}

.btn-secondary:hover {
    background: var(--secondary-dark);
    color: var(--white);
}

.btn-outline {
    background: transparent;
    color: var(--white);
    border-color: rgba(255, 255, 255, 0.4);
}

.btn-outline:hover {
    background: var(--white);
    color: var(--primary);
    border-color: var(--white);
}

.btn-outline-primary {
    background: transparent;
    color: var(--primary);
    border-color: var(--primary);
}

.btn-outline-primary:hover {
    background: var(--primary);
    color: var(--white);
}

.btn-dark {
    background: var(--dark);
    color: var(--white);
}

.btn-success {
    background: var(--success);
    color: var(--white);
}

.btn-danger {
    background: var(--danger);
    color: var(--white);
}

.btn-sm {
    padding: 6px 14px;
    font-size: 0.75rem;
}

.btn-lg {
    padding: 14px 32px;
    font-size: 1rem;
}

.btn-block {
    width: 100%;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Sections */
.section {
    padding: 60px 0;
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 32px;
}

.section-title {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--dark);
}

.section-title::after {
    content: '';
    display: block;
    width: 48px;
    height: 3px;
    background: var(--primary);
    margin-top: 8px;
    border-radius: var(--radius-full);
}

.section-link {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--primary);
    font-weight: 600;
    font-size: 0.875rem;
}

/* Category Cards */
.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 16px;
}

.category-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 24px 16px;
    text-align: center;
    transition: var(--transition);
    border: 1px solid var(--gray-200);
    text-decoration: none;
    display: block;
}

.category-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary);
}

.category-icon {
    width: 56px;
    height: 56px;
    border-radius: var(--radius-lg);
    background: var(--primary-light);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 12px;
    font-size: 22px;
    color: var(--primary);
    transition: var(--transition);
}

.category-card:hover .category-icon {
    background: var(--primary);
    color: var(--white);
}

.category-card h3 {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 4px;
}

.category-card span {
    font-size: 0.75rem;
    color: var(--gray);
}

/* Product Grid & Card */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 20px;
}

.product-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: var(--transition);
    border: 1px solid var(--gray-200);
    display: flex;
    flex-direction: column;
    position: relative;
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
    border-color: transparent;
}

.product-image {
    position: relative;
    padding-top: 100%;
    background: var(--gray-50);
    overflow: hidden;
}

.product-image img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 16px;
    transition: transform 0.5s ease;
}

.product-card:hover .product-image img {
    transform: scale(1.08);
}

.product-badges {
    position: absolute;
    top: 12px;
    left: 12px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    z-index: 2;
}

.product-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: var(--radius-sm);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
}

.badge-sale {
    background: var(--danger);
    color: var(--white);
}

.badge-new {
    background: var(--success);
    color: var(--white);
}

.badge-hot {
    background: var(--secondary);
    color: var(--white);
}

.product-actions-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 12px;
    display: flex;
    justify-content: center;
    gap: 8px;
    transform: translateY(100%);
    transition: var(--transition);
}

.product-card:hover .product-actions-overlay {
    transform: translateY(0);
}

.product-actions-overlay button {
    width: 40px;
    height: 40px;
    border-radius: var(--radius);
    background: var(--white);
    color: var(--dark-600);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    box-shadow: var(--shadow-md);
    border: none;
}

.product-actions-overlay button:hover {
    background: var(--primary);
    color: var(--white);
}

.product-info {
    padding: 16px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.product-category {
    font-size: 0.75rem;
    color: var(--primary);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 6px;
}

.product-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--dark);
    line-height: 1.4;
    margin-bottom: 4px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-title a {
    color: inherit;
    text-decoration: none;
}

.product-title a:hover {
    color: var(--primary);
}

.product-desc {
    font-size: 0.75rem;
    color: var(--gray);
    margin-bottom: 12px;
}

.product-price {
    margin-top: auto;
    display: flex;
    align-items: baseline;
    gap: 8px;
    flex-wrap: wrap;
}

.current-price {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--primary);
}

.old-price {
    font-size: 0.875rem;
    color: var(--gray-light);
    text-decoration: line-through;
}

.discount-percent {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--danger);
    background: #fef2f2;
    padding: 2px 8px;
    border-radius: var(--radius-sm);
}

.product-footer {
    padding: 12px 16px;
    border-top: 1px solid var(--gray-200);
}

.product-footer .btn {
    width: 100%;
}

/* Product Detail — Premium Redesign */
.pd-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
    align-items: start;
}

.pd-gallery {
    position: sticky;
    top: 88px;
}

.pd-image-main {
    background: var(--white);
    border-radius: var(--radius-lg);
    border: 1px solid var(--gray-200);
    padding: 32px;
    position: relative;
    overflow: hidden;
}

.pd-image-main img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: contain;
    transition: transform 0.4s ease;
}

.pd-image-main:hover img {
    transform: scale(1.05);
}

.pd-badge-sale,
.pd-badge-new {
    position: absolute;
    top: 16px;
    z-index: 2;
    padding: 6px 14px;
    border-radius: var(--radius-sm);
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.pd-badge-sale {
    left: 16px;
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: var(--white);
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.3);
}

.pd-badge-new {
    right: 16px;
    background: linear-gradient(135deg, #22c55e, #16a34a);
    color: var(--white);
    box-shadow: 0 2px 8px rgba(34, 197, 94, 0.3);
}

/* Info Panel */
.pd-info {
    background: var(--white);
    border-radius: var(--radius-lg);
    border: 1px solid var(--gray-200);
    padding: 32px;
}

.pd-brand {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    text-decoration: none;
    padding: 4px 12px;
    background: var(--primary-light);
    border-radius: var(--radius-full);
    margin-bottom: 12px;
    transition: var(--transition-fast);
}

.pd-brand:hover {
    background: var(--primary);
    color: var(--white);
}

.pd-title {
    font-size: 1.375rem;
    font-weight: 700;
    color: var(--dark);
    line-height: 1.4;
    margin-bottom: 12px;
}

.pd-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--gray-200);
}

.pd-meta-item {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.8rem;
    color: var(--gray);
}

.pd-meta-item i {
    font-size: 0.7rem;
}

.pd-stock.in-stock {
    color: var(--success);
    font-weight: 600;
}

.pd-stock.out-of-stock {
    color: var(--danger);
    font-weight: 600;
}

/* Price Box */
.pd-price-box {
    background: linear-gradient(135deg, #f0f7ff 0%, #e8f4f8 100%);
    border: 1px solid #d0e8f2;
    border-radius: var(--radius-lg);
    padding: 20px;
    margin-bottom: 20px;
}

.pd-price-row {
    display: flex;
    align-items: baseline;
    gap: 12px;
    flex-wrap: wrap;
}

.pd-current-price {
    font-size: 2rem;
    font-weight: 800;
    color: var(--primary);
    letter-spacing: -0.02em;
}

.pd-old-price {
    font-size: 1rem;
    color: var(--gray);
    text-decoration: line-through;
}

.pd-discount-tag {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--white);
    background: linear-gradient(135deg, #ef4444, #dc2626);
    padding: 4px 10px;
    border-radius: var(--radius-full);
}

.pd-savings {
    margin-top: 10px;
    font-size: 0.8rem;
    color: #059669;
    display: flex;
    align-items: center;
    gap: 6px;
}

.pd-savings i {
    font-size: 0.9rem;
}

/* Short Description */
.pd-short-desc {
    font-size: 0.875rem;
    color: var(--dark-600);
    line-height: 1.7;
    margin-bottom: 20px;
    padding: 14px;
    background: var(--gray-50);
    border-radius: var(--radius);
    border-left: 3px solid var(--primary);
}

.pd-short-desc p {
    margin: 0;
}

/* Add to Cart Actions */
.pd-actions {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-bottom: 24px;
}

.pd-qty {
    display: flex;
    align-items: center;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--white);
}

.pd-qty button {
    width: 40px;
    height: 44px;
    background: var(--gray-50);
    border: none;
    font-size: 12px;
    color: var(--dark-600);
    cursor: pointer;
    transition: var(--transition-fast);
}

.pd-qty button:hover {
    background: var(--primary);
    color: var(--white);
}

.pd-qty input {
    width: 48px;
    height: 44px;
    text-align: center;
    border: none;
    font-weight: 700;
    font-size: 0.95rem;
    outline: none;
    background: var(--white);
    border-left: 1px solid var(--gray-200);
    border-right: 1px solid var(--gray-200);
}

.pd-add-cart {
    flex: 1;
    height: 48px;
    font-size: 0.95rem !important;
    border-radius: var(--radius) !important;
}

.pd-wishlist-btn {
    width: 48px;
    height: 48px;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius);
    background: var(--white);
    color: var(--gray);
    font-size: 18px;
    cursor: pointer;
    transition: var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
}

.pd-wishlist-btn:hover {
    border-color: #ef4444;
    color: #ef4444;
    background: #fef2f2;
}

/* Out of Stock */
.pd-out-of-stock-msg {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px;
    background: #fef3c7;
    border: 1px solid #fde68a;
    border-radius: var(--radius);
    margin-bottom: 24px;
    color: #92400e;
}

.pd-out-of-stock-msg i {
    font-size: 1.5rem;
}

.pd-out-of-stock-msg strong {
    display: block;
    margin-bottom: 2px;
}

.pd-out-of-stock-msg p {
    margin: 0;
    font-size: 0.8rem;
    opacity: 0.8;
}

/* Guarantee Badges */
.pd-guarantees {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    padding-top: 20px;
    border-top: 1px solid var(--gray-200);
}

.pd-guarantee {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    border-radius: var(--radius);
    background: var(--gray-50);
    transition: var(--transition-fast);
}

.pd-guarantee:hover {
    background: var(--primary-light);
}

.pd-guarantee>i {
    font-size: 1.25rem;
    color: var(--primary);
    min-width: 24px;
    text-align: center;
}

.pd-guarantee strong {
    display: block;
    font-size: 0.75rem;
    color: var(--dark);
}

.pd-guarantee span {
    font-size: 0.65rem;
    color: var(--gray);
}

/* Tabs Section */
.pd-tabs-section {
    margin-top: 32px;
    background: var(--white);
    border-radius: var(--radius-lg);
    border: 1px solid var(--gray-200);
    overflow: hidden;
}

.pd-tabs-header {
    display: flex;
    border-bottom: 2px solid var(--gray-200);
    background: var(--gray-50);
}

.pd-tab {
    padding: 14px 28px;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--gray);
    background: none;
    border: none;
    cursor: pointer;
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition-fast);
}

.pd-tab:hover {
    color: var(--primary);
}

.pd-tab.active {
    color: var(--primary);
    background: var(--white);
}

.pd-tab.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--primary);
    border-radius: 3px 3px 0 0;
}

.pd-tab-content {
    padding: 28px;
}

.pd-description-content {
    font-size: 0.9375rem;
    line-height: 1.8;
    color: var(--dark-600);
}

.pd-description-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 16px 0;
    font-size: 0.875rem;
}

.pd-description-content table td {
    padding: 10px 14px;
    border: 1px solid var(--gray-200);
}

.pd-description-content table tr:nth-child(even) {
    background: var(--gray-50);
}

.pd-description-content table td:first-child {
    font-weight: 600;
    color: var(--dark);
    background: var(--gray-50);
    min-width: 160px;
}

.pd-description-content img {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius);
}

/* Related */
.pd-related {
    margin-top: 48px;
}

@media (max-width: 768px) {
    .pd-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .pd-gallery {
        position: static;
    }

    .pd-guarantees {
        grid-template-columns: 1fr;
    }

    .pd-actions {
        flex-wrap: wrap;
    }

    .pd-add-cart {
        width: 100%;
        order: 3;
    }
}