:root {
    --primary: #8A2BE2;
    --secondary: #5D3FD3;
    --accent: #9370DB;
    --dark: #1A1A2E;
    --darker: #0F0F1B;
    --light: #F8F6FF;
    --gray: #2D2D44;
    --eco-green: #4CAF50;
}


* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background: linear-gradient(180deg, var(--dark) 0%, var(--darker) 100%);
    color: #333;
    line-height: 1.6;
    padding: 20px;
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
        margin-bottom: 48px;

}

header {
    text-align: center;
    padding: 30px 0;
}

h1 {
    font-size: 2.8rem;
    color: var(--light);
    margin-bottom: 10px;
    font-weight: 700;
}

.subtitle {
    font-size: 1.2rem;
    color: #7f8c8d;
    max-width: 600px;
    margin: 0 auto;
}

.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
    margin-top: 40px;
}

.template {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.1) 0%, rgba(56, 35, 114, 0.3) 100%);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.template:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

.template-img-container {
    position: relative;
    overflow: hidden;
    height: 200px;
}

.template-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.template:hover .template-img {
    transform: scale(1.05);
}

.template-info {
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.template-title {
    font-size: 1.3rem;
    color: #CCCCDD;
    margin-bottom: 8px;
}

.template-desc {
    color: #7f8c8d;
    font-size: 0.95rem;
    margin-bottom: 15px;
    flex-grow: 1;
}

.template-actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.action-btn {
    flex: 1;
    padding: 12px 0;
    /* Consistent padding for all buttons */
    font-size: 0.95rem;
    border-radius: 86px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-width: 0;
}

.btn-view,
.btn-order {
    width: 100%;
    /* Both buttons fill their flex space */
    box-sizing: border-box;
}

.btn-view {
    display: inline-block;
    padding: 14px 2px;
    margin: 10px;
    border-radius: 50px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
    font-weight: bold;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 8px 25px rgba(138, 43, 226, 0.3);
    border: none;
    cursor: pointer;
}

.btn-view:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 30px rgba(138, 43, 226, 0.4);
}

.btn-order {
    background: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
    margin: auto;
}

.btn-order:hover {
    background: var(--primary);
    color: white;
}


/* Responsive Design */
@media (max-width: 1024px) {
    .gallery {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    }
}

@media (max-width: 768px) {
    h1 {
        font-size: 2.4rem;
    }

    .subtitle {
        font-size: 1.1rem;
    }

    .gallery {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 20px;
    }

    .template-info {
        padding: 15px;
    }

    .action-btn {
        padding: 10px 12px;
        font-size: 0.9rem;
    }
}

@media (max-width: 640px) {
    body {
        padding: 15px;
    }

    header {
        padding: 20px 0;
    }

    h1 {
        font-size: 2rem;
    }

    .subtitle {
        font-size: 1rem;
        padding: 0 10px;
    }

    .gallery {
        grid-template-columns: 1fr;
        max-width: 400px;
        margin: 30px auto;
    }

    .template-actions {
        flex-direction: column;
    }

    .action-btn {
        width: 100%;
    }

    .templates-btn {
        bottom: 20px;
        right: 20px;
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
    }

}

@media (max-width: 480px) {
    h1 {
        font-size: 1.8rem;
    }

    .subtitle {
        font-size: 0.95rem;
    }

    .template-img-container {
        height: 180px;
    }

    .template-title {
        font-size: 1.2rem;
    }

    .template-desc {
        font-size: 0.9rem;
    }

    .templates-btn {
        bottom: 20px;
        right: 20px;
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
    }

}

@media (max-width: 360px) {
    h1 {
        font-size: 1.6rem;
    }

    .template-img-container {
        height: 160px;
    }

    .action-btn {
        padding: 8px 10px;
        font-size: 0.85rem;
    }

    .templates-btn {
        bottom: 20px;
        right: 20px;
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
    }

}