/* style.css - SNNS Store */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: #f8f9fa;
    color: #333;
    line-height: 1.6;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 0;
}

/* ====================
 *  HEADER & NAVIGATION
 *  ==================== */
.header {
    background: white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 5%;
}

/* ====================
 *  LOGO
 *  ==================== */
.logo {
    height: 60px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.profile-logo {
    height: 100%;
    width: auto;
    max-width: 180px;
    object-fit: contain;
    border-radius: 5px;
    transition: opacity 0.3s;
}

.profile-logo:hover {
    opacity: 0.8;
}

/* Responsive logo */
@media (max-width: 768px) {
    .logo {
        height: 50px;
    }
    .profile-logo {
        max-width: 140px;
    }
}

@media (max-width: 480px) {
    .logo {
        height: 45px;
    }
    .profile-logo {
        max-width: 120px;
    }
}

.nav-menu {
    display: flex;
    list-style: none;
}

.nav-menu li {
    margin-left: 30px;
}

.nav-menu a {
    text-decoration: none;
    color: #555;
    font-weight: 500;
    font-size: 16px;
    transition: color 0.3s;
    position: relative;
}

.nav-menu a:hover,
.nav-menu a.active {
    color: #d33;
}

.nav-menu a.active::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 100%;
    height: 2px;
    background: #d33;
}

.cart-icon {
    position: relative;
    display: inline-block;
    text-decoration: none;
    color: #555;
}

#cart-count {
position: absolute;
top: -10px;
right: -12px;
background: #d33;
color: white;
border-radius: 50%;
width: 22px;
height: 22px;
font-size: 13px;
font-weight: bold;
display: flex;
align-items: center;
justify-content: center;
line-height: 1;
padding: 0;
border: 2px solid white;
box-shadow: 0 2px 5px rgba(0,0,0,0.2);
z-index: 10;
}

.cart-icon:hover #cart-count {
    background: #b22;
    transform: scale(1.1);
    transition: all 0.2s;
}

.cart-icon i {
    font-size: 20px;
    padding: 5px;
}

/* ====================
 *  HERO SECTION
 *  ==================== */
.hero {
    background: linear-gradient(rgba(0,0,0,0.3), rgba(0,0,0,0.3)), url('https://snns.web.id/pm.png');
    background-size: cover;
    background-position: center center;
    min-height: 500px;
    height: 70vh;
    max-height: 700px;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    text-align: center;
    margin-bottom: 25px;
    padding-bottom: 80px;
    position: relative;
}

.hero-content {
    width: 100%;
    max-width: 800px;
    padding: 0 20px;
}

.hero-box {
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(10px);
    padding: 8px 20px;
    /*border-radius: 12px;*/
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
    max-width: 220px;
    margin: 0 auto;
    border: 1px solid rgba(255, 255, 255, 0.3);
    display: inline-block;
}

.hero-content h1 {
    font-size: 20px;
    color: #1a1a1a;
    font-weight: 600;
    margin: 0;
    /*letter-spacing: 2px;*/
}

/* Responsive Hero */
@media (max-width: 768px) {
    .hero {
        min-height: 400px;
        /*height: 60vh;*/
        padding-bottom: 60px;
    }
    .hero-box {
        padding: 15px 30px;
        max-width: 280px;
    }
    .hero-content h1 {
        font-size: 24px;
    }
}

@media (max-width: 480px) {
    .hero {
        min-height: 350px;
        /*height: 50vh;*/
        padding-bottom: 40px;
    }
    .hero-box {
        padding: 1px 3px;
        max-width: 170px;
    }
    .hero-content h1 {
        font-size: 12px;
    }
}

/* ====================
 *  PRODUCT GRID
 *  ==================== */
.section-title {
    text-align: center;
    font-size: 32px;
    margin-bottom: 30px;
    color: #222;
}

.filter-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.filter-options {
    display: flex;
    flex-wrap: wrap;
}

.filter-link {
    margin-right: 25px;
    text-decoration: none;
    color: #666;
    font-weight: 500;
    transition: color 0.3s;
}

.filter-link:hover,
.filter-link.active {
    color: #d33;
}

.filter-controls select {
    padding: 8px 15px;
    border: 1px solid #ddd;
    background: white;
    border-radius: 4px;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* 2 kolom tetap */
    gap: 15px;
    margin-bottom: 40px;
    max-width: 800px; /* Batasi lebar agar tidak terlalu lebar */
    margin-left: auto;
    margin-right: auto;
}

/* Untuk mobile - tetap 2 kolom */
@media (max-width: 480px) {
    .product-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
}

/* Untuk tablet - tetap 2 kolom */
@media (min-width: 481px) and (max-width: 768px) {
    .product-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
}


/* Desktop: 6 kolom seperti Shopee */
@media (min-width: 1025px) {
    .product-grid {
        grid-template-columns: repeat(6, 1fr);
        gap: 12px;
        max-width: 1200px;
        margin-left: auto;
        margin-right: auto;
    }
}

/* Desktop besar: tetap 6 kolom dengan gap lebih besar */
@media (min-width: 1400px) {
    .product-grid {
        grid-template-columns: repeat(6, 1fr);
        gap: 16px;
        max-width: 1300px;
    }
}

.product-card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: transform 0.2s, box-shadow 0.2s;
    border: 1px solid #f0f0f0;
}

.product-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.12);
}

.product-img {
    width: 100%;
    aspect-ratio: 1 / 1; /* Kotak persegi seperti Shopee */
    object-fit: cover;
    background: #f5f5f5;
}

.product-info {
    padding: 12px 14px 14px;
}

.product-name {
    font-size: 14px;
    font-weight: 400;
    margin-bottom: 6px;
    color: #222;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.4;
    min-height: 40px;
}

.product-price {
    color: #d33;
    font-weight: 700;
    font-size: 16px;
    margin-bottom: 10px;
}

.product-actions {
    display: flex;
    gap: 8px;
}

.btn-quickview, .btn-addcart {
    padding: 6px 12px;
    border: none;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.3s;
    border-radius: 4px;
    flex: 1;
}

.btn-quickview {
    background: #f0f0f0;
    color: #333;
}

.btn-quickview:hover {
    background: #e0e0e0;
}

.btn-addcart {
    background: #d33;
    color: white;
}

.btn-addcart:hover {
    background: #b22;
}

/* ====================
 *  MODAL (QUICK VIEW)
 *  ==================== */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.7);
    align-items: center;
    justify-content: center;
}

.modal-content {
    background-color: white;
    padding: 30px;
    border-radius: 8px;
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
}

.close-modal {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 28px;
    cursor: pointer;
    color: #aaa;
}

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

.modal-body {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
}

.modal-product-image {
    flex: 1;
    min-width: 300px;
}

.modal-product-image img {
    width: 100%;
    height: auto;
    border-radius: 5px;
}

.modal-product-details {
    flex: 1;
    min-width: 300px;
}

.modal-product-details h2 {
    font-size: 24px;
    margin-bottom: 10px;
}

.modal-product-price {
    font-size: 22px;
    color: #d33;
    font-weight: 600;
    margin-bottom: 20px;
}

.modal-option {
    margin-bottom: 15px;
}

.modal-option label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
}

.modal-option select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.btn-modal-addcart {
    background: #d33;
    color: white;
    border: none;
    padding: 12px 30px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    width: 100%;
    margin-top: 20px;
    border-radius: 4px;
    transition: background 0.3s;
}

.btn-modal-addcart:hover {
    background: #b22;
}

/* ====================
 *  CART PAGE
 *  ==================== */
.page-title {
    font-size: 32px;
    margin-bottom: 30px;
    color: #222;
    text-align: center;
}

.cart-wrapper {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
}

@media (min-width: 993px) {
    .cart-wrapper {
        grid-template-columns: 2fr 1fr;
        grid-template-areas:
        "shipping shipping"
        "items summary";
    }
}

@media (max-width: 992px) {
    .cart-wrapper {
        grid-template-areas:
        "shipping"
        "items"
        "summary";
    }
}

.shipping-form {
    grid-area: shipping;
}

.cart-items {
    grid-area: items;
}

.cart-summary {
    grid-area: summary;
}

.cart-items {
    background: white;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

.cart-summary {
    background: white;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    align-self: flex-start;
}

@media (min-width: 993px) {
    .cart-summary {
        position: sticky;
        top: 20px;
    }
}

.cart-summary h3 {
    font-size: 22px;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
    font-size: 16px;
}

.summary-row.total {
    font-size: 20px;
    font-weight: 600;
    color: #d33;
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

.shipping-note {
    font-size: 14px;
    color: #666;
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

.cart-actions {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 25px;
}

.btn-clear, .btn-checkout {
    padding: 14px;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.btn-clear {
    background: #f5f5f5;
    color: #666;
}

.btn-clear:hover {
    background: #e5e5e5;
    color: #d33;
}

.btn-checkout {
    background: #25D366;
    color: white;
}

.btn-checkout:hover {
    background: #128C7E;
}

.cart-item {
    display: flex;
    background: white;
    padding: 20px;
    margin-bottom: 20px;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    align-items: center;
    flex-wrap: wrap;
}

.cart-item-image {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: 5px;
    margin-right: 20px;
}

.cart-item-details {
    flex: 1;
    min-width: 200px;
}

.cart-item-name {
    font-size: 18px;
    font-weight: 500;
    margin-bottom: 8px;
}

.cart-item-price {
    color: #d33;
    font-weight: 600;
    font-size: 16px;
}

.cart-item-controls {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-top: 15px;
}

.quantity-control {
    display: flex;
    align-items: center;
    border: 1px solid #ddd;
    border-radius: 4px;
    overflow: hidden;
}

.qty-btn {
    background: #f5f5f5;
    border: none;
    width: 35px;
    height: 35px;
    cursor: pointer;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.qty-input {
    width: 50px;
    height: 35px;
    border: none;
    text-align: center;
    font-size: 16px;
}

.btn-remove {
    background: transparent;
    border: none;
    color: #d33;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.btn-remove:hover {
    text-decoration: underline;
}

.empty-cart-message {
    text-align: center;
    font-size: 18px;
    color: #666;
    padding: 50px 20px;
}

/* ====================
 *  SHIPPING FORM STYLES
 *  ==================== */
.shipping-form {
    background: white;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    width: 100%;
}

.shipping-form h3 {
    font-size: 20px;
    margin-bottom: 20px;
    color: #222;
    display: flex;
    align-items: center;
    gap: 10px;
}

.shipping-form h3 i {
    color: #d33;
}

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

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

.form-group label::after {
    content: " *";
    color: #d33;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 16px;
    font-family: inherit;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #d33;
    box-shadow: 0 0 0 2px rgba(211, 51, 51, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: #999;
    opacity: 1;
}

.form-note {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 5px;
    border-left: 4px solid #25D366;
    font-size: 14px;
    color: #555;
    margin-top: 10px;
}

.form-note i {
    color: #25D366;
    margin-right: 8px;
}

.form-note p {
    margin: 0;
}

/* ====================
 *  ABOUT PAGE
 *  ==================== */
.about-container {
    padding-top: 40px;
    padding-bottom: 60px;
}

.about-content {
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
    align-items: center;
}

.about-image {
    flex: 1;
    min-width: 300px;
}

.about-image img {
    width: 100%;
    height: auto;
    border-radius: 8px;
}

.about-text {
    flex: 1;
    min-width: 300px;
}

.about-text h2 {
    font-size: 28px;
    margin-bottom: 20px;
    color: #222;
}

.about-text p {
    margin-bottom: 15px;
    font-size: 16px;
    color: #555;
}

/* ====================
 *  FOOTER
 *  ==================== */
.footer {
    background: #222;
    color: white;
    text-align: center;
    padding: 25px 0;
    margin-top: 60px;
}

/* ============================================
 *  TOAST NOTIFICATION STYLES
 *  ============================================ */
.snns-toast {
    position: fixed;
    top: 25px;
    right: 25px;
    min-width: 320px;
    max-width: 400px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 35px rgba(0, 0, 0, 0.15);
    padding: 18px;
    z-index: 9999;
    transform: translateX(400px);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    overflow: hidden;
    border-left: 5px solid #4CAF50;
}

.snns-toast.show {
    transform: translateX(0);
    opacity: 1;
}

.snns-toast.success {
    border-left-color: #4CAF50;
    background: linear-gradient(135deg, #ffffff, #f8fff8);
}

.snns-toast.warning {
    border-left-color: #FF9800;
    background: linear-gradient(135deg, #ffffff, #fff8f0);
}

.snns-toast.info {
    border-left-color: #2196F3;
    background: linear-gradient(135deg, #ffffff, #f0f8ff);
}

.toast-content {
    display: flex;
    align-items: center;
    gap: 15px;
}

.toast-icon {
    font-size: 22px;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.snns-toast.success .toast-icon {
    background: linear-gradient(135deg, #4CAF50, #45a049);
    color: white;
    box-shadow: 0 4px 10px rgba(76, 175, 80, 0.3);
}

.snns-toast.warning .toast-icon {
    background: linear-gradient(135deg, #FF9800, #f57c00);
    color: white;
    box-shadow: 0 4px 10px rgba(255, 152, 0, 0.3);
}

.snns-toast.info .toast-icon {
    background: linear-gradient(135deg, #2196F3, #1976D2);
    color: white;
    box-shadow: 0 4px 10px rgba(33, 150, 243, 0.3);
}

.toast-message {
    flex: 1;
    font-size: 14px;
    line-height: 1.5;
    color: #333;
    font-weight: 500;
}

.toast-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    width: 100%;
    background: rgba(0, 0, 0, 0.05);
    overflow: hidden;
}

.toast-progress::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    height: 100%;
    width: 100%;
    animation: progressBar 3s linear forwards;
}

.snns-toast.success .toast-progress::after {
    background: linear-gradient(90deg, #4CAF50, #8BC34A);
}

.snns-toast.warning .toast-progress::after {
    background: linear-gradient(90deg, #FF9800, #FFB74D);
}

.snns-toast.info .toast-progress::after {
    background: linear-gradient(90deg, #2196F3, #64B5F6);
}

@keyframes progressBar {
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(0);
    }
}

/* ============================================
 *  SPLASH SCREEN ANIMATION
 *  ============================================ */
.splash-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    opacity: 1;
    visibility: visible;
    transition: all 0.8s cubic-bezier(0.86, 0, 0.07, 1);
}

.splash-screen.hide {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.splash-logo {
    text-align: center;
    transform: scale(0.8);
    animation: logoZoomIn 1.2s cubic-bezier(0.68, -0.55, 0.265, 1.55) forwards;
}

.splash-logo-img {
    width: 180px;
    height: auto;
    filter: brightness(0) invert(1) drop-shadow(0 0 20px rgba(255, 255, 255, 0.3));
    animation: logoGlow 2s ease-in-out infinite alternate;
}

.splash-loading {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 30px;
}

.loading-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #999;
    opacity: 0;
    animation: loadingDots 1.5s ease-in-out infinite;
}

.loading-dot:nth-child(1) {
    animation-delay: 0.1s;
}

.loading-dot:nth-child(2) {
    animation-delay: 0.2s;
}

.loading-dot:nth-child(3) {
    animation-delay: 0.3s;
}

@keyframes logoZoomIn {
    0% {
        transform: scale(0.8) translateY(20px);
        opacity: 0;
    }
    40% {
        transform: scale(1.05);
        opacity: 1;
    }
    60% {
        transform: scale(1);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes logoGlow {
    0% {
        filter: brightness(0) invert(1) drop-shadow(0 0 10px rgba(255, 255, 255, 0.2));
    }
    100% {
        filter: brightness(0) invert(1) drop-shadow(0 0 25px rgba(255, 255, 255, 0.4));
    }
}

@keyframes loadingDots {
    0%, 100% {
        opacity: 0.3;
        transform: translateY(0);
    }
    50% {
        opacity: 1;
        transform: translateY(-10px);
        background: #ccc;
    }
}

body.content-loaded {
    animation: contentFadeIn 0.8s ease-out;
}

@keyframes contentFadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* ====================
 *  RESPONSIVE DESIGN
 *  ==================== */
@media (max-width: 768px) {
    .navbar {
        flex-direction: column;
        padding: 15px 5%;
    }

    .nav-menu {
        margin-top: 20px;
        flex-wrap: wrap;
        justify-content: center;
    }

    .nav-menu li {
        margin: 0 10px 10px;
    }

    .filter-bar {
        flex-direction: column;
        align-items: flex-start;
    }

    .filter-options {
        margin-bottom: 15px;
    }

    .shipping-form {
        padding: 20px;
    }

    .shipping-form h3 {
        font-size: 18px;
    }

    .form-group input,
    .form-group textarea {
        padding: 10px 12px;
        font-size: 15px;
    }

    .cart-item {
        flex-direction: column;
        align-items: flex-start;
    }

    .cart-item-image {
        width: 100%;
        height: 200px;
        margin-right: 0;
        margin-bottom: 15px;
    }

    .cart-item-details {
        width: 100%;
    }

    .cart-item-controls {
        justify-content: space-between;
        width: 100%;
    }

    .snns-toast {
        top: 15px;
        right: 15px;
        left: 15px;
        min-width: auto;
        max-width: none;
        transform: translateY(-100px);
    }

    .snns-toast.show {
        transform: translateY(0);
    }

    .toast-content {
        gap: 12px;
    }

    .toast-icon {
        width: 36px;
        height: 36px;
        font-size: 18px;
    }

    .toast-message {
        font-size: 13px;
    }
}
/* HERO LINK - Agar SHOP NOW bisa diklik */
.hero-link {
    display: inline-block;
    text-decoration: none;
    /* padding: 5px 10px; */
    transition: all 0.3s ease;
    cursor: pointer;
}

.hero-link:hover {
    transform: scale(1.05);
}

.hero-link h1 {
    font-size: 18px;
    color: #1a1a1a;
    font-weight: 600;
    margin: 0;
    letter-spacing: 1px;
    transition: color 0.3s ease;
}
