/* Amazon Store Pro - Frontend Styles */

/* Version: 3.4.0 - Multi-Image & Details */



/* ===== MAIN KIT CONTAINER ===== */

.amz-pro-kit {

    max-width: 1200px;

    margin: 50px auto;

    padding: 0 20px;

    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;

    background: #ffffff;

    border-radius: 20px;

    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);

    overflow: hidden;

}



/* ===== KIT HEADER ===== */

.amz-kit-header {

    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);

    padding: 50px 40px;

    text-align: center;

    color: white;

    position: relative;

    overflow: hidden;

}



.amz-kit-header::before {

    content: '';

    position: absolute;

    top: 0;

    left: 0;

    right: 0;

    bottom: 0;

    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 100" fill="%23ffffff" opacity="0.1"><polygon points="1000,100 1000,0 0,100"/></svg>');

    background-size: cover;

}



.amz-kit-title {

    font-size: 3em;

    font-weight: 800;

    margin: 0 0 20px 0;

    color: white;

    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);

    position: relative;

    z-index: 2;

}



/* ===== COUNTRY SELECTOR ===== */

.amz-country-selector {

    display: inline-flex;

    align-items: center;

    gap: 15px;

    background: rgba(255, 255, 255, 0.15);

    padding: 15px 25px;

    border-radius: 50px;

    backdrop-filter: blur(20px);

    border: 1px solid rgba(255, 255, 255, 0.2);

    position: relative;

    z-index: 2;

}



.amz-country-selector span {

    font-weight: 600;

    font-size: 16px;

    opacity: 0.9;

}



.amz-country-switcher {

    padding: 12px 20px;

    border: 2px solid rgba(255, 255, 255, 0.3);

    border-radius: 25px;

    background: rgba(255, 255, 255, 0.9);

    font-size: 15px;

    font-weight: 600;

    color: #333;

    cursor: pointer;

    transition: all 0.3s ease;

    min-width: 200px;

}



.amz-country-switcher:hover {

    background: white;

    border-color: white;

    transform: translateY(-2px);

    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);

}



/* ===== PRODUCTS GRID ===== */

.amz-products-grid {

    display: grid;

    gap: 30px;

    padding: 50px 40px;

    background: #f8f9fa;

}



/* Grid columns based on container attribute */

.amz-products-grid[data-columns="2"] { grid-template-columns: repeat(2, 1fr); }

.amz-products-grid[data-columns="3"] { grid-template-columns: repeat(3, 1fr); }

.amz-products-grid[data-columns="4"] { grid-template-columns: repeat(4, 1fr); }

.amz-products-grid[data-columns="5"] { grid-template-columns: repeat(5, 1fr); }



/* ===== PRODUCT CARD ===== */

.amz-product-card {

    background: white;

    border-radius: 15px;

    overflow: hidden;

    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);

    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.08);

    border: 1px solid #e8e8e8;

    position: relative;

    width: 280px;

    height: 420px;

    margin: 10px;

    display: flex;

    flex-direction: column;

}



.amz-product-card:hover {

    transform: translateY(-10px) scale(1.02);

    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15);

    border-color: #667eea;

}



.amz-product-card::before {

    content: '';

    position: absolute;

    top: 0;

    left: 0;

    right: 0;

    height: 4px;

    background: linear-gradient(135deg, #667eea, #764ba2);

    opacity: 0;

    transition: opacity 0.3s ease;

}



.amz-product-card:hover::before {

    opacity: 1;

}



/* ===== PRODUCT IMAGE ===== */

.amz-product-image {

    position: relative;

    width: 100%;

    height: 150px;

    overflow: hidden;

    background: transparent;

    display: flex;

    align-items: center;

    justify-content: center;

}



.amz-product-image img {

    width: 150px;

    height: 150px;

    object-fit: cover;

    transition: all 0.6s ease;

    background: transparent;

    position: absolute;

    top: 0;

    left: 0;

    opacity: 0;

}



.amz-product-image img.active {

    opacity: 1;

    position: relative;

}



/* Image hover slide effect */

.amz-product-card:hover .amz-product-image img {

    transform: scale(1.05);

}



.amz-product-card:hover .amz-product-image img:not(.active) {

    opacity: 0;

}



.amz-product-card .amz-product-image:hover img.active {

    opacity: 0;

}



.amz-product-card .amz-product-image:hover img:nth-child(2) {

    opacity: 1;

    transition-delay: 0.3s;

}



.amz-product-card .amz-product-image:hover img:nth-child(3) {

    opacity: 1;

    transition-delay: 0.6s;

}



.amz-product-card .amz-product-image:hover img:nth-child(4) {

    opacity: 1;

    transition-delay: 0.9s;

}



/* Image counter */

.amz-image-counter {

    position: absolute;

    bottom: 8px;

    right: 8px;

    background: rgba(0, 0, 0, 0.7);

    color: white;

    padding: 4px 8px;

    border-radius: 12px;

    font-size: 11px;

    font-weight: 600;

    z-index: 5;

}



/* ===== DISCOUNT BADGE ===== */

.amz-discount-badge {

    position: absolute;

    top: 10px;

    left: -25px;

    background: linear-gradient(45deg, #e53e3e, #c53030);

    color: white;

    padding: 4px 30px;

    font-size: 11px;

    font-weight: 800;

    text-transform: uppercase;

    transform: rotate(-45deg);

    box-shadow: 0 2px 8px rgba(229, 62, 62, 0.3);

    z-index: 10;

    letter-spacing: 1px;

    line-height: 1.2;

}



/* ===== PRODUCT INFO ===== */

.amz-product-info {

    padding: 15px;

    text-align: center;

    flex: 1;

    display: flex;

    flex-direction: column;

    justify-content: space-between;

}



.amz-product-title {

    font-size: 16px;

    font-weight: 700;

    line-height: 1.4;

    margin: 0 0 8px 0;

    color: #2d3748;

    height: 44px;

    display: -webkit-box;

    -webkit-line-clamp: 2;

    -webkit-box-orient: vertical;

    overflow: hidden;

    text-overflow: ellipsis;

}



/* ===== PRODUCT DETAILS ===== */

.amz-product-details {

    margin: 8px 0 12px 0;

    text-align: left;

}



.amz-product-details p {

    font-size: 13px;

    line-height: 1.4;

    color: #666;

    margin: 0;

    display: -webkit-box;

    -webkit-line-clamp: 3;

    -webkit-box-orient: vertical;

    overflow: hidden;

    text-overflow: ellipsis;

    height: 55px;

}



/* ===== PRODUCT PRICING ===== */

.amz-product-pricing {

    display: flex;

    justify-content: center;

    align-items: center;

    gap: 8px;

    margin: 8px 0 15px 0;

    height: 25px;

    flex-wrap: wrap;

}



.amz-selling-price {

    font-size: 18px;

    font-weight: 800;

    color: #2d3748;

}



.amz-original-price {

    font-size: 14px;

    color: #999;

    text-decoration: line-through;

}



/* ===== PRODUCT ACTIONS ===== */

.amz-product-actions {

    display: flex;

    justify-content: center;

    align-items: center;

    margin-top: auto;

    width: 100%;

}



/* Regular Buy Button */

.amz-buy-button {

    display: inline-flex;

    align-items: center;

    justify-content: center;

    background: linear-gradient(135deg, #667eea, #764ba2);

    color: white !important;

    padding: 10px 0;

    text-decoration: none;

    border-radius: 8px;

    font-weight: 700;

    font-size: 13px;

    transition: all 0.3s ease;

    border: none;

    cursor: pointer;

    width: 100%;

    max-width: 220px;

    height: 40px;

    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);

    margin: 0 auto;

}



.amz-buy-button:hover {

    background: linear-gradient(135deg, #5a6fd8, #6b46c1);

    transform: translateY(-2px);

    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);

    color: white !important;

}



/* CTA Image Button */

.amz-cta-button {

    display: inline-flex;

    align-items: center;

    justify-content: center;

    border-radius: 8px;

    overflow: hidden;

    transition: all 0.3s ease;

    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);

    border: 2px solid transparent;

    width: 100%;

    max-width: 220px;

    height: 40px;

    margin: 0 auto;

}



.amz-cta-button:hover {

    transform: translateY(-2px);

    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);

    border-color: #667eea;

}



.amz-cta-button img {

    display: block;

    width: 100%;

    height: 100%;

    object-fit: cover;

    border-radius: 6px;

}



/* ===== LOADING STATES ===== */

.amz-product-image img[src=""],

.amz-product-image img:not([src]) {

    opacity: 0.5;

    background: transparent url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="50" height="50" viewBox="0 0 50 50" fill="%23666"><path d="M25 5A20 20 0 1 0 25 45A20 20 0 1 0 25 5Z" stroke="%23666" stroke-width="2" fill="none"/></svg>') center no-repeat;

}



/* ===== EMPTY STATES ===== */

.amz-pro-kit:empty::before {

    content: 'No products found in this kit.';

    display: block;

    text-align: center;

    padding: 60px 20px;

    color: #666;

    font-size: 18px;

    background: #f8f9fa;

    border-radius: 10px;

    margin: 20px;

}



/* ===== RESPONSIVE DESIGN ===== */



/* Large Desktop */

@media (max-width: 1440px) {

    .amz-pro-kit {

        margin: 40px auto;

    }

    

    .amz-products-grid[data-columns="5"] {

        grid-template-columns: repeat(4, 1fr);

    }

}



/* Desktop */

@media (max-width: 1200px) {

    .amz-products-grid[data-columns="4"],

    .amz-products-grid[data-columns="5"] {

        grid-template-columns: repeat(3, 1fr);

    }

    

    .amz-kit-title {

        font-size: 2.5em;

    }

}



/* Tablet */

@media (max-width: 992px) {

    .amz-pro-kit {

        margin: 30px 20px;

        border-radius: 15px;

    }

    

    .amz-kit-header {

        padding: 40px 30px;

    }

    

    .amz-kit-title {

        font-size: 2em;

    }

    

    .amz-products-grid {

        padding: 40px 30px;

        gap: 25px;

    }

    

    .amz-products-grid[data-columns="3"],

    .amz-products-grid[data-columns="4"],

    .amz-products-grid[data-columns="5"] {

        grid-template-columns: repeat(2, 1fr);

    }

    

    .amz-country-selector {

        flex-direction: column;

        gap: 12px;

        text-align: center;

        padding: 20px;

    }

    

    .amz-country-switcher {

        min-width: 180px;

    }

    

    /* Tablet Image Size */

    .amz-product-image {

        height: 140px;

    }

    

    .amz-product-image img {

        width: 140px;

        height: 140px;

    }

    

    .amz-product-card {

        width: 100%;

        max-width: 300px;

        margin: 0 auto;

        height: 400px;

    }

    

    /* Tablet Button Size */

    .amz-buy-button {

        height: 38px;

        font-size: 12px;

        max-width: 200px;

    }

    

    .amz-cta-button {

        height: 38px;

        max-width: 200px;

    }

    

    /* Tablet Discount Badge */

    .amz-discount-badge {

        font-size: 10px;

        padding: 3px 25px;

        top: 8px;

        left: -22px;

    }

}



/* Large Mobile */

@media (max-width: 768px) {

    .amz-pro-kit {

        margin: 20px 15px;

        border-radius: 12px;

    }

    

    .amz-kit-header {

        padding: 30px 20px;

    }

    

    .amz-kit-title {

        font-size: 1.8em;

        margin-bottom: 15px;

    }

    

    .amz-products-grid {

        padding: 30px 20px;

        gap: 20px;

        grid-template-columns: 1fr !important;

    }

    

    .amz-product-info {

        padding: 12px;

    }

    

    .amz-product-title {

        font-size: 15px;

        height: 42px;

    }

    

    .amz-product-details p {

        font-size: 12px;

        height: 50px;

    }

    

    .amz-product-actions {

        justify-content: center;

    }

    

    .amz-buy-button {

        height: 36px;

        font-size: 12px;

        max-width: 180px;

    }

    

    .amz-cta-button {

        height: 36px;

        max-width: 180px;

    }

    

    /* Mobile Image Size */

    .amz-product-image {

        height: 130px;

    }

    

    .amz-product-image img {

        width: 130px;

        height: 130px;

    }

    

    .amz-product-card {

        width: 100%;

        max-width: 280px;

        height: 380px;

        margin: 0 auto;

    }

    

    /* Mobile Discount Badge */

    .amz-discount-badge {

        font-size: 9px;

        padding: 3px 20px;

        top: 6px;

        left: -20px;

    }

}



/* Mobile */

@media (max-width: 480px) {

    .amz-pro-kit {

        margin: 15px 10px;

        border-radius: 10px;

    }

    

    .amz-kit-header {

        padding: 25px 15px;

    }

    

    .amz-kit-title {

        font-size: 1.5em;

    }

    

    .amz-products-grid {

        padding: 25px 15px;

        gap: 15px;

    }

    

    .amz-product-info {

        padding: 10px;

    }

    

    .amz-product-title {

        font-size: 14px;

        height: 40px;

    }

    

    .amz-product-details p {

        font-size: 11px;

        height: 45px;

        -webkit-line-clamp: 2;

    }

    

    .amz-buy-button {

        padding: 8px 0;

        font-size: 11px;

        height: 34px;

        max-width: 160px;

    }

    

    .amz-cta-button {

        height: 34px;

        max-width: 160px;

    }

    

    .amz-country-selector {

        padding: 15px;

    }

    

    .amz-country-switcher {

        padding: 8px 12px;

        font-size: 13px;

        min-width: 140px;

    }

    

    /* Mobile Image Size */

    .amz-product-image {

        height: 120px;

    }

    

    .amz-product-image img {

        width: 120px;

        height: 120px;

    }

    

    .amz-product-card {

        height: 360px;

    }

    

    /* Mobile Pricing */

    .amz-selling-price {

        font-size: 16px;

    }

    

    .amz-original-price {

        font-size: 13px;

    }

    

    /* Mobile Discount Badge */

    .amz-discount-badge {

        font-size: 8px;

        padding: 2px 18px;

        top: 5px;

        left: -18px;

    }

}



/* ===== CENTER BUTTON FOR ALL DEVICES ===== */

.amz-product-actions {

    display: flex !important;

    justify-content: center !important;

    align-items: center !important;

    width: 100% !important;

}



.amz-buy-button,

.amz-cta-button {

    margin-left: auto !important;

    margin-right: auto !important;

    display: flex !important;

    justify-content: center !important;

}



/* ===== DARK MODE SUPPORT ===== */

@media (prefers-color-scheme: dark) {

    .amz-pro-kit {

        background: #1a1a1a;

        color: #ffffff;

    }

    

    .amz-products-grid {

        background: #2d2d2d;

    }

    

    .amz-product-card {

        background: #2d2d2d;

        border-color: #404040;

    }

    

    .amz-product-title {

        color: #ffffff;

    }

    

    .amz-product-details p {

        color: #cccccc;

    }

    

    .amz-product-image {

        background: transparent;

    }

    

    .amz-selling-price {

        color: #ffffff;

    }

    

    .amz-original-price {

        color: #999;

    }

}



/* ===== ANIMATIONS ===== */

@keyframes amzFadeInUp {

    from {

        opacity: 0;

        transform: translateY(30px);

    }

    to {

        opacity: 1;

        transform: translateY(0);

    }

}



.amz-product-card {

    animation: amzFadeInUp 0.6s ease-out;

}



.amz-product-card:nth-child(odd) {

    animation-delay: 0.1s;

}



.amz-product-card:nth-child(even) {

    animation-delay: 0.2s;

}



/* ===== ACCESSIBILITY ===== */

@media (prefers-reduced-motion: reduce) {

    .amz-product-card,

    .amz-product-image img,

    .amz-buy-button,

    .amz-cta-button,

    .amz-country-switcher {

        transition: none;

        animation: none;

    }

}



/* Focus styles for keyboard navigation */

.amz-buy-button:focus,

.amz-cta-button:focus,

.amz-country-switcher:focus {

    outline: 3px solid #667eea;

    outline-offset: 2px;

}



/* ===== PRINT STYLES ===== */

@media print {

    .amz-country-selector,

    .amz-product-actions {

        display: none;

    }

    

    .amz-pro-kit {

        box-shadow: none;

        margin: 0;

    }

    

    .amz-product-card {

        break-inside: avoid;

        box-shadow: none;

        border: 1px solid #ccc;

    }

}